$('select').change(function() {
//important stuff
});
验证选择ID做important stuff
我想通过它的ID来验证问题的选择之前。我想要影响的所有ID都以_stat
结尾。你如何用JQuery中的正则表达式(或其他)做到这一点?JQuery的上变化
$('select').change(function() {
if ($("select[id*='_stat']")) { //<~ this aint work
//important stuff
}
});
大点。我打算在自己添加这个。 :) +1 –
我会怎么做,乔恩? – Norse
@Norse:更新了解释的答案。 – Jon