js判断是否浏览器为ie内核,进行错误页面跳转

代码:

function IEVersion () {
    if (document.documentMode) return document.documentMode;
  }
  if (IEVersion()) {
    window.location='/error.html'
  } 

error.html

<!DOCTYPE html>
<!-- saved from url=(0035)http://test.exam-100.com/error.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="icon" href="./logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>成果转化服务中心</title>
<style>.back{
    margin-top: 30px;
}.broswer{padding-top:100px;text-align:center;}.broswer ._title{margin:50px auto;}.broswer .down{width:650px;margin:0 auto;}.broswer .down ._img{width:59px;height:59px;margin:0 auto;}._imgMg{margin-top:20px;}a{text-decoration:none;color:#4688f6;}</style>
</head>
<body>
<div class="broswer" id="broswer">
<div class="_top">
<img src="./no_support.png" alt="">
</div>
<h2 class="_title"><span>你正在使用的浏览器版本过低,推荐切换极速模式或使用其他浏览器</span></h2>
<div class="down">
<div class="_img">
<img src="./chrome.png" alt="">
</div>
<div class="_imgMg"><a href="https://www.google.cn/chrome/" target="_blank">推荐使用 Google Chrome 浏览</a></div>
</div>
<div class="back"><a href="http://10.18.4.24:65002/">点击返回并切换极速模式</a>
</div>
</div>


</body></html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值