[英]jQuery not selector with [name] selector
I have following jQuery selector to select inputs by a specific name: 我有以下jQuery选择器以按特定名称选择输入:
find('input[name=sn_cmd]')
now I want to add another selector to it to ignore any input whose id is "send". 现在,我想向其添加另一个选择器,以忽略ID为“ send”的任何输入。
What should I do? 我该怎么办?
Try using the :not
selector, 尝试使用
:not
选择器,
find('input[name=sn_cmd]:not("#send")')
or you can do the same thing using the .not()
function. 或者您可以使用
.not()
函数执行相同的操作。
find('input[name=sn_cmd]').not('#send')
您也可以这样做:
find('input[name=sn_cmd]').not('#send');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.