使用更加友好的方式提示浏览器不兼容问题

This commit is contained in:
virusdefender
2016-04-08 11:32:58 +08:00
parent 941fa8e5fc
commit 5423ac708a
7 changed files with 24 additions and 39 deletions

View File

@@ -18,6 +18,16 @@
<body ms-controller="admin">
<div id="browser-unsupported" style="display: none">人生苦短, 何必还在用这么老的浏览器~
当前网页 <strong>不支持</strong> 你正在使用的浏览器, 为了正常的访问,
<a href="http://browsehappy.com/">升级你的浏览器</a>
</div>
<script>
if(navigator.userAgent.indexOf("MSIE") > -1){
document.getElementById("browser-unsupported").removeAttribute("style");
}
</script>
<!-- nav begin -->
<nav class="navbar navbar-masthead navbar-default navbar-static-top">
<div class="container">

View File

@@ -25,9 +25,14 @@
<body>
<div id="browser-unsupported" style="display: none">人生苦短, 何必还在用这么老的浏览器~
当前网页 <strong>不支持</strong> 你正在使用的浏览器, 为了正常的访问,
<a href="http://browsehappy.com/">升级你的浏览器</a>
</div>
<script>
if(navigator.userAgent.indexOf("MSIE") > -1){
location.href = "/static/img/unsupported_browser.html";
document.getElementById("browser-unsupported").removeAttribute("style");
}
</script>