Jquery檢測低版本瀏覽器提示相關(guān)信息的實(shí)現(xiàn)代碼片段,以下代碼為項(xiàng)目開發(fā)中的片段,實(shí)現(xiàn)方法思路僅供參考。
//低版本瀏覽器提示
(function () {
var b_name = navigator.appName;
var b_version = navigator.appVersion;
var version = b_version.split(";");
if (b_name == "Microsoft Internet Explorer") {
var trim_version = version[1].replace(/[ ]/g, "");
/*如果是IE6或者IE7*/
if (trim_version == "MSIE7.0" || trim_version == "MSIE6.0" || trim_version == "MSIE8.0" || trim_version == "MSIE9.0" || trim_version == "MSIE10.0") {
getBrowserNoticeDomNew();
}
}
})();
//低版本瀏覽器提示
(function () {
var b_name = navigator.appName;
var b_version = navigator.appVersion;
var version = b_version.split(";");
if (b_name == "Microsoft Internet Explorer") {
var trim_version = version[1].replace(/[ ]/g, "");
/*如果是IE6或者IE7*/
if (trim_version == "MSIE7.0" || trim_version == "MSIE6.0" || trim_version == "MSIE8.0" || trim_version == "MSIE9.0" || trim_version == "MSIE10.0") {
getBrowserNoticeDomNew();
}
}
})();