PageSourceSearch

http://www.people.com.cn/img/2020peopleindex/js/ief.js

js people.com.cn collected 2026-10-01 07:06:05 UTC 1,287 bytes, 35 lines download raw bytes

1// 新增的ie版本判断
2function IEVersion() {
3    var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串  
4    var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器  
5    var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器  
6    var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
7    if (isIE) {
8      var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
9      reIE.test(userAgent);
10      var fIEVersion = parseFloat(RegExp["$1"]);
11      if (fIEVersion == 7) {
12        return 7;
13      } else if (fIEVersion == 8) {
14        return 8;
15      } else if (fIEVersion == 9) {
16        return 9;
17      } else if (fIEVersion == 10) {
18        return 10;
19      } else {
20        return 6; //IE版本<=7
21      }
22    } else if (isEdge) {
23      return 'edge'; //edge
24    } else if (isIE11) {
25      return 11; //IE11  
26    } else {
27      return -1; //不是ie浏览器
28    }
29}
30window.ieVersion = IEVersion()
31if (window.ieVersion >= 6 && window.ieVersion <= 8) {
32    //window.ie67890 = true;
33    //$('body').addClass('ie67890')
34    alert("您的浏览器版本过低,为了达到最佳的浏览效果,请下载新版浏览器或切换到极速模式!")
35}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.