判断浏览器是IE还是Firefox

<script>
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName==\'Netscape\')?1:0;
var isIE=(navigator.appName.indexOf(\'Microsoft\')!=-1)?1:0;
}
if (isNN)
alert(\'NETSCAPE [FF/OTHER]\');
if (isIE)
alert(\'IE\');
</script>

博客分类: 
Total votes: 1189

添加新评论