[英]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: 示例:使用此代码我调用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. 查看jQuery选择器文档以获取更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.