其他分享
首页 > 其他分享> > js获取浏览器信息

js获取浏览器信息

作者:互联网

<body>
  <p id="example"></p>
</body>
<script>
txt = "<p>浏览器代号: " + navigator.appCodeName + "</p>";
txt+= "<p>浏览器名称: " + navigator.appName + "</p>";
txt+= "<p>浏览器版本: " + navigator.appVersion + "</p>";
txt+= "<p>启用Cookies: " + navigator.cookieEnabled + "</p>";
txt+= "<p>硬件平台: " + navigator.platform + "</p>";
txt+= "<p>用户代理: " + navigator.userAgent + "</p>";
txt+= "<p>用户代理语言: " + navigator.language + "</p>";
document.getElementById("example").innerHTML=txt;
</script>

 

标签:浏览器,用户,appName,代理,js,获取,navigator,txt
来源: https://www.cnblogs.com/dazahui/p/14426777.html