index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  8. <title>测试</title>
  9. <!-- <script type="text/javascript" src="mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
  10. <script>
  11. function IEVersion() {
  12. var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  13. var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
  14. var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
  15. var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
  16. if(isIE) {
  17. var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
  18. reIE.test(userAgent);
  19. var fIEVersion = parseFloat(RegExp["$1"]);
  20. if(fIEVersion == 7) {
  21. return 7;
  22. } else if(fIEVersion == 8) {
  23. return 8;
  24. } else if(fIEVersion == 9) {
  25. return 9;
  26. } else if(fIEVersion == 10) {
  27. return 10;
  28. } else {
  29. return 6;//IE版本<=7
  30. }
  31. } else if(isEdge) {
  32. return 12;//edge
  33. } else if(isIE11) {
  34. return 11; //IE11
  35. }else{
  36. return -1;//不是ie浏览器
  37. }
  38. }
  39. var version = IEVersion();
  40. if(version != -1 && version < 10) {
  41. if(window.confirm("您的浏览器版本过低,推荐使用IE10及以上浏览器或者chrome浏览器,点击确定下载chrome安装浏览器。若是360等浏览器,开启兼容模式")){
  42. window.open("/download/44.0.2403.89_chrome_installer.exe", "_blank");
  43. }
  44. }
  45. </script>
  46. </head>
  47. <body>
  48. <noscript>
  49. <strong>We're sorry but my-project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  50. </noscript>
  51. <div id="app"></div>
  52. <!-- built files will be auto injected -->
  53. </body>
  54. </html>