function judgmentBrowser(){
var ua = navigator.userAgent;
if(/firefox/i.test(ua)){
alert("你是火狐");
}else if(/chrome/i.test(ua)){
alert("你是Chrome");
}else if(/msie/i.test(ua)){
alert("你是IE");
}else if("ActiveXObject" in window){
alert("你是IE11");
}
}
javascript实用功能----判断是哪个浏览器(火狐、谷歌、ie、ie11)
猜你喜欢
转载自blog.csdn.net/zf18234031156/article/details/84108075
今日推荐
周排行