[JS] - 判断IE6和IE7

来源:http://dlphp.cn/index.php?a=programX&id=780

 

  
    
< script >
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 == " MSIE7.0 " ){
alert(
" IE 7.0 " );
}
else if (browser == " Microsoft Internet Explorer "
&& trim_Version == " MSIE6.0 " ){
alert(
" IE 6.0 " );
}
< / script>

 

你可能感兴趣的:(ie6)