有人可以帮我弄清楚为什么这没有触发吗?
$("input:radio[name=cm-fo-ozlkr]").change( function(){
alert('Handler for .change() called.');
});
HTML
<input type="radio" checked="checked" class="styled" value="1397935" id="cm1397935" name="cm-fo-ozlkr"><input type="radio" class="styled" value="1397934" id="cm1397934" name="cm-fo-ozlkr">
最佳答案
您的属性选择器缺少引号;
$("input:radio[name='cm-fo-ozlkr']").change( function(){
alert('Handler for .change() called.');
});
关于jquery - onchange 事件不提醒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5966339/