Reputation: 3189
How can I select elements which contains "name" attribute ?
Example of the elements :
<select id="itemPK.country.id_id" name="itemPK.country.id"><option value="7">India</option><option value="8">Malaysia</option></select>
<input id="point_id" name="point" type="number" value="">
Upvotes: 1
Views: 82
Reputation: 1367
The attribute selectors are what you need:
$('input[name="point"]')...
$('[name="something"]') //In case it's not specifically an <input> element
Good luck
Edit: I see, you may have asked for elements which contain a certain attribute, not those that contain X value in the name attribute. The answer provided by PSR is the way to go. This is the documentation for the "Has attribute" selector.
Upvotes: 2