1、jquery: navigator.userAgent.indexOf("MSIE") >= 0 || (navigator.userAgent.indexOf("Mozilla") >= 0 && navigator.userAgent.indexOf("Chrome") == -1);
注:IE11的內核標示是Mozilla
2、打印使用console.log("****"+navigator.userAgent);
谷歌瀏覽器如圖所示:
IE瀏覽器如圖所示:
3、打斷點使用debugger;