(function (window) {
var userAgent = window.navigator.userAgent;
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
var isEdge = userAgent.indexOf("Edge") > -1 && !isIE;
if (isIE || isIE11) {
var str = "为了保证最佳用户体验,当前系统不支持IE浏览器,邀请您使用现代高级浏览器";
var str2 =
"推荐使用:<a href='https://www.google.com/intl/zh-CN/chrome/' target='_blank' style='color:blue; display:inline-block; width: 150px;'>Chrome 谷歌</a>" +
"<a href='http://www.firefox.com.cn/' target='_blank' style='color:blue; display:inline-block; width: 150px;'>FireFox 火狐</a>" ;
document.writeln(
"<div style='text-align:center;color:#333; height:100%;border:0;position:fixed;top:0;left:0;width:100%;z-index:1234'>" +
"<h2 style='padding-top:200px;margin:0;'><strong>" +
str +
"<br/></strong></h2><h2>" +
str2 +
"</h2></div>");
document.title = "浏览器升级提示"
document.execCommand("Stop");
}
})(window);