Jquery 选择除开某元素的其他所有元素

以input为例  选择除了name=example01 的所有其他input:

$("input[name!='example01']").click(function(){

    alert($(this).val());
})                

 亲测,除了 name=example01 的输入框均能绑定点击事件

猜你喜欢

转载自blog.csdn.net/loveer0/article/details/81263144