一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

js判断浏览器类型代码

时间:2010-11-13 编辑:简简单单 来源:一聚教程网

网页特效">
function client(o){
 
    var b = navigator.useragent.tolowercase();  
    var t = false;
    if (o == 'isop'){
    t = b.indexof('opera') > -1;
    }
    if (o == 'isie'){
    t = b.indexof('msie') > -1;
    }
    if (o == 'isff'){
    t = b.indexof('firefox') > -1;
    }
       return t;
}
alert(client('isie'));