判断是否为ie浏览器皇牌天下投注网

来源:http://www.prospettivedarte.com 作者:计算机教程 人气:133 发布时间:2019-05-11
摘要:function isIE(){ var userAgent = navigator.userAgent, rMsie = /(msies|trident.*rv:)([w.] )/, rFirefox = /(firefox)/([w.] )/, rOpera = /(opera). version/([w.] )/, rChrome = /(chrome)/([w.] )/, rSafari = /version/([w.] ).*(safari)/; var brows
function isIE(){
    var userAgent = navigator.userAgent, 
    rMsie = /(msies|trident.*rv:)([w.] )/, 
    rFirefox = /(firefox)/([w.] )/, 
    rOpera = /(opera). version/([w.] )/, 
    rChrome = /(chrome)/([w.] )/, 
    rSafari = /version/([w.] ).*(safari)/; 
    var browser; 
    var version; 
    var ua = userAgent.toLowerCase(); 

    var match = rMsie.exec(ua);    
    if (match != null) {  
        ieVersion = { browser : "IE", version : match[2] || "0" };
        return true; 
    }  
    var match = rFirefox.exec(ua);  
    if (match != null) {  
        var ffVersion = { browser : match[1] || "", version : match[2] || "0" };
        return false; 
    }  
    var match = rOpera.exec(ua);  
    if (match != null) { 
       var opVersion =  { browser : match[1] || "", version : match[2] || "0" };
       return false;
    }  
    var match = rChrome.exec(ua);  
    if (match != null) {  

        var chVersion = { browser : match[1] || "", version : match[2] || "0" };
        return false;
    }  
    var match = rSafari.exec(ua);  
    if (match != null) {  

       var sfVersion = { browser : match[2] || "", version : match[1] || "0" }; 
       return false;
    }  
    if (match != null) {  
        var ohterVersion = { browser : "", version : "0" }; 
        return false;
    }
}

 

本文由皇牌天下投注网发布于计算机教程,转载请注明出处:判断是否为ie浏览器皇牌天下投注网

关键词:

上一篇:MySQL表碎片整理

下一篇:没有了

最火资讯