IE浏览器版本判断

<script type="text/javascript">
        var browser=navigator.appName
        var b_version=navigator.appVersion
        var version=b_version.split(";");
        var trim_Version=version[1].replace(/[ ]/g,"");
        if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0")
        {
            alert("请使用IE9,谷歌,火狐等浏览器,不支持IE低版本!");
        }
        else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0")
        {
            alert("请使用IE9,谷歌,火狐等浏览器,不支持IE低版本!");
        }
     else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE8.0") { alert("请使用IE9,谷歌,火狐等浏览器,不支持IE低版本!"); }
else { window.location="login.action"; } </script>

 

posted @ 2015-08-25 15:11  微明Axel  阅读(212)  评论(0)    收藏  举报