JS获取浏览器信息

发布时间:2010年08月31日      浏览次数:674 次
<html>
<body>
<script type="text/javascript">
<!--
document.write("<p>浏览器:")
document.write(navigator.appName + "</p>")

document.write("<p>浏览器版本:")
document.write(navigator.appVersion + "</p>")

document.write("<p>代码:")
document.write(navigator.appCodeName + "</p>")

document.write("<p>平台:")
document.write(navigator.platform + "</p>")

document.write("<p>Cookies 启用:")
document.write(navigator.cookieEnabled + "</p>")

document.write("<p>浏览器的用户代理报头:")
document.write(navigator.userAgent + "</p>")
// -->
</script>
</body>
</html>
本机运行结果:
< type="text/javascript">
浏览器:Microsoft Internet Explorer
浏览器版本:4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
代码:Mozilla
平台:Win32
Cookies 启用:true
浏览器的用户代理报头:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!