JavaScript 实例:检测浏览器的全部信息

来源:网络时间:2011-04-26 16:04:17

[code]<html>
<body>

<script type="text/Javascript">
var x = navigator;
document.write("CodeName=" + x.appCodeName);
document.write("<br />");
document.write("MinorVersion=" + x.appMinorVersion);
document.write("<br />");
document.write("Name=" + x.appName);
document.write("<br />");
document.write("Version=" + x.appversion);
document.write("<br />");
document.write("CookieEnabled=" + x.cookieEnabled);
document.write("<br />");
document.write("cpuClass=" + x.cpuClass);
document.write("<br />");
document.write("OnLine=" + x.onLine);
document.write("<br />");
document.write("Platform=" + x.platform);
document.write("<br />");
document.write("UA=" + x.userAgent);
document.write("<br />");
document.write("BrowserLanguage=" + x.browserLanguage);
document.write("<br />");
document.write("SystemLanguage=" + x.systemLanguage);
document.write("<br />");
document.write("UserLanguage=" + x.userLanguage);
</script>

</body>
</html>
[/code][button value="复制代码"]

 

CodeName=Mozilla
MinorVersion=0
Name=Microsoft Internet Explorer
Version=4.0 (compatible; MSIE 7.0; windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET4.0C; .NET4.0E; Maxthon 2.0)
CookieEnabled=true
CPUClass=x86
OnLine=true
Platform=Win32
UA=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET4.0C; .NET4.0E; Maxthon 2.0)
BrowserLanguage=zh-cn
SystemLanguage=zh-cn
UserLanguage=zh-cn

文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站) 联系邮箱:9145908@qq.com
多特网友 2012-07-01 14:32:40 回复
如果可以再写的详细一点,或者是加一些中文注释将会更好
多特网友 2012-07-01 14:32:40 回复
如果可以再写的详细一点,或者是加一些中文注释将会更好