首页 应用 游戏 资讯 攻略

JavaScript 实例:检测浏览器版本及更多信息

时间:2011-04-26 关注公众号 来源:网络

[code]<html>
<body>
<script type="text/javascript">
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
document.write("浏览器名称:"+ browser)
document.write("<br />")
document.write("浏览器版本:"+ version)
</script>
</body>
</html>
[/code][button value="复制代码"]

 

浏览器名称:Microsoft Internet Explorer
浏览器版本:4

 

[code]<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>
[/code][button value="复制代码"]

 

浏览器:Microsoft Internet Explorer

浏览器版本: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)

代码:Mozilla

平台:Win32

Cookies 启用:true

浏览器的用户代理报头: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)

阅读全文
扫码关注“ 多特资源库
更多更全的软件资源下载
文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站)
玩家热搜

相关攻略

正在加载中
版权
版权说明

文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站)

电话:13918309914

QQ:1967830372

邮箱:rjfawu@163.com

toast