我有这个用于检查复选框的脚本,它在 firefox 和 google chrome 中运行良好,但在 IE 9 中不起作用
$notifyBySmsCheckbox
.change(function(){
if (this.checked) {console.log('checked');
$('#f_notify_by_sms_instructions, #f_notify_by_sms_pin, #cellphoneInfo').show();
}
else {console.log('not checked');
$('#f_notify_by_sms_instructions, #f_notify_by_sms_pin, #cellphoneInfo').hide();
}
})
.change();
有人知道这是为什么吗?
最佳答案
..这很可能是因为 IE 没有控制台对象。尝试删除 console.log,一切都会好起来的!
关于javascript - 脚本在 IE 9 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12039921/