js实现判断浏览器版本

//判断浏览器版本是否过低
var ua = navigator.userAgent.toLowerCase();
if (window.ActiveXObject) var IEversion = ua.match(/msie ([\d.]+)/)[1]; if (IEversion < 8) location.href = "/static/kill-ie.html";

浏览器版本低于8以下就跳到kill-ie.html

posted @ 2016-10-10 08:58  hllive  阅读(127)  评论(0编辑  收藏  举报