// IE版本判断 (function IEVersion() { var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器 if (isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion < 10) { var result = window.confirm('当前浏览器版本较低,为获得更好的用户体验,请升级您的浏览器版本') if (result == true) { window.location.href = 'https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads' rel="nofollow" } } } })()