简体   繁体   中英

jQuery select by input name

I have this input:

<tr><td class="forms">Price:</td><td><input type="text" name="price" size="30"/></td></tr>

How can I call this input?

Example: With this code I call to the id:

$("#numberclasses").change(function() {

And I call to the class with this:

$(".numberclasses").change(function() {

But How can I call to the name?

Use:

$('input[name="price"]').change(function() {

Check out the jQuery selectors docs for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM