区分ie6办法

1.

var isIE6 = (/msie/.test(userAgent) && !/opera/.test(userAgent) && parseInt(browserVersion) < 7 && (!window.XMLHttpRequest || typeof(XMLHttpRequest) === 'function'));

 

2.

    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") {return true;}else{return false;}

posted @ 2010-02-24 17:04  朝夕  阅读(221)  评论(0编辑  收藏  举报