0
可能重复:
Select elements with class except one with specific id的jQuery - 选择类型零下名
我必须选择类型选择一种形式,但我想用一个名字就像一个词来丢弃ID。
我:
$("select").onchange(function(){
alert("change");
});
我想TNX TNX
可能重复:
Select elements with class except one with specific id的jQuery - 选择类型零下名
我必须选择类型选择一种形式,但我想用一个名字就像一个词来丢弃ID。
我:
$("select").onchange(function(){
alert("change");
});
我想TNX TNX
使用:not()
型
$("select minus select with ID like 'noChange'").onchange(function(){
alert("change");
});
:
$("select:not(#noChange)").onchange(function(){
alert("change");
});
或者,如果noChange
是身份证的一部分,而不是确切的ID:
$("select:not([id*='noChange'])").onchange(function(){
alert("change");
});
对不起,如果我想用like?函数'formToJsonByIdLike(nameForm,like) { var jsonForm = {}; (函数(索引){jsonForm [$(this).attr(“id”)] = $(“输入,选择,复选框:[id * =”+ like +“]”,$(nameForm))。 this.value; }); return jsonForm; }' – Shinigami