取消选择本来由班级选择的ID

时间:2010-04-25 23:39:21

标签: jquery-selectors

我有一个页面,其中为所有输入分配了一个行为:        $(“input”)。blur(function(){

我需要排除具有特定ID的复选框:

  <input type="checkbox" id="allButMe" onchange="billingSameChanged();" value="true"/> 

THX

2 个答案:

答案 0 :(得分:3)

像这样使用jQuery's not selector

$("input:not(#allButMe)").blur(function() { });

答案 1 :(得分:0)

在这里使用jQuery not

$("input").not("#allButMe").blur(function() {});