Monday 24 December 2018

javascript - How do I select an element with its name attribute in jQuery?





How to get an element with its name attribute with jQuery?



Is there anything (like # for id and . for class) for name in jQuery?


Answer



$('[name="ElementNameHere"]').doStuff();


jQuery supports CSS3 style selectors, plus some more.



See more





No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...