jQuery .not(),多个用id排除
我得到了一小段代码来重置一个表单:
$("#reset").click(function() { $(':input','#fundingpossibility') .not(':button, :submit, :reset, :hidden') .val(''); });
我想在#test
.not()
选择器中添加一个输入字段,比如#test
的id。 我尝试了各种各样的东西,但无法使它发挥作用。 有没有人有任何想法?
只需添加另一个逗号( 多选择器 ),例如:
$("#reset").click(function() { $(':input','#fundingpossibility') .not(':button, :submit, :reset, :hidden, #test') .val(''); });