脚本在IE 9中不起作用

Oak*_*ork 1 javascript jquery jsp internet-explorer-9

我有这个脚本用于检查复选框,它在firefox和谷歌浏览器中运行良好,但它在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();
Run Code Online (Sandbox Code Playgroud)

谁知道为什么这是??

小智 5

..最有可能是因为IE没有控制台对象.尝试并删除co​​nsole.log,你会没事的!