如何找到我们通过javascript访问的浏览器 [英] How to find which Browser we access through javascript
本文介绍了如何找到我们通过javascript访问的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的女士\先生您能告诉我吗?
如何找到我们通过javascript
respected madam\sir can u tell me
How to find which Browser we access through javascript
推荐答案
可以访问的浏览器,请尝试以下操作:
try this :
<div id="example"></div>
<script type="text/javascript">
txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";
document.getElementById("example").innerHTML=txt;
</script>
希望对您有所帮助:)
hope it helps :)
这篇关于如何找到我们通过javascript访问的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文