function writeObj(obj) {
var description = "";
for (var i in obj) {
var property = obj[i];
description += i + " = " + property + "\n";
}
alert(description);
}
function myexplorer(){
var explorer = window.navigator.userAgent;
if (explorer.indexOf("QQBrowser")>=0 || explorer.indexOf("QQ")>=0){
return myexplorer="腾讯QQ";
}else if(explorer.indexOf("Safari")>=0 && explorer.indexOf("MetaSr")>=0){
return myexplorer="搜狗";
}else{
if (explorer.indexOf("LBBROWSER") >= 0){return myexplorer="猎豹";
}else if(explorer.indexOf("360ee")>=0){return myexplorer="360极速浏览器";
}else if(explorer.indexOf("360se")>=0){return myexplorer="360安全浏览器";
}else if(explorer.indexOf("se")>=0){return myexplorer="搜狗浏览器";
}else if(explorer.indexOf("aoyou")>=0){return myexplorer="遨游浏览器";
}else if(explorer.indexOf("qqbrowser")>=0){return myexplorer="QQ浏览器";
}else if(explorer.indexOf("baidu")>=0){return myexplorer="百度浏览器";
}else if(explorer.indexOf("Firefox")>=0){return myexplorer="火狐";
}else if(explorer.indexOf("Maxthon")>=0){return myexplorer="遨游";
}else if(explorer.indexOf("Chrome")>=0){return myexplorer="谷歌(或360伪装)";
}else if(explorer.indexOf("Opera")>=0){return myexplorer="欧朋";
}else if (explorer.indexOf("TheWorld") >= 0){return myexplorer="世界之窗";
}else if(explorer.indexOf("Safari")>=0){return myexplorer="苹果";
}else{return myexplorer="其他";
}
}
}
document.write("客户端浏览器是:"+myexplorer());