首页 > web前端 > js教程 > 正文

javascript 获取完整的浏览器信息

巴扎黑
发布: 2016-12-20 16:23:23
原创
1071 人浏览过

以下是使用Javascript获取浏览器中的完整的信息.

<pre name="code" class="html"><html>
<head>
<title>JS完整获取IE浏览器信息</title>
</head>
<body color="red" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="435" border="1" cellspacing="3" cellpadding="0">
  <tr>
    <td>浏览器类型</td>
    <td> 
      <script>document.write(navigator.appName)</script>
    </td>
  </tr>
  <tr>
    <td >浏览器版本</td>
    <td > 
      <script>document.write(navigator.appVersion)</script>
    </td>
  </tr>
  <tr>
    <td>浏览器语言</td>
    <td> 
      <script>document.write(navigator.browserLanguage)</script>
    </td>
  </tr>
  <tr>
    <td >CPU类型</td>
    <td > 
      <script>document.write(navigator.cpuClass)</script>
    </td>
  </tr>
  <tr>
    <td>操作系统</td>
    <td> 
      <script>document.write(navigator.platform)</script>
    </td>
  </tr>
  <tr>
    <td >系统语言</td>
    <td > 
      <script>document.write(navigator.systemLanguage)</script>
    </td>
  </tr>
  <tr>
    <td>用户语言;</td>
    <td> 
      <script>document.write(navigator.userLanguage)</script>
    </td>
  </tr>
  <tr>
    <td >在线情况</td>
    <td > 
      <script>document.write(navigator.onLine)</script>
    </td>
  </tr>
  <tr>
    <td>屏幕分辨率</td>
    <td>      <script>document.write(window.screen.width+"x"+window.screen.height)</script></td>
  </tr>
  <tr>
    <td>颜色</td>
    <td> <script>document.write(window.screen.colorDepth+"位")</script></td>
  </tr>
  <tr>
    <td>字体平滑</td>
    <td><script>document.write(window.screen.fontSmoothingEnabled)</script></td>
  </tr>
  <tr>
    <td>appMinorVersion</td>
    <td> 
      <script>document.write(navigator.appMinorVersion)</script>
    </td>
  </tr>
  <tr>
    <td >appCodeName</td>
    <td > 
      <script>document.write(navigator.appCodeName)</script>
    </td>
  </tr>
  <tr>
    <td>cookieEnabled</td>
    <td> 
      <script>document.write(navigator.cookieEnabled)</script>
    </td>
  </tr>
  <tr>
    <td >userAgent</td>
    <td > 
      <script>document.write(navigator.userAgent)</script>
    </td>
  </tr>
  <tr>
    <td>javaEnabled</td>
    <td> 
      <script>document.write(navigator.javaEnabled())</script>
    </td>
  </tr>
  <tr>
    <td >taintEnabled</td>
    <td > 
      <script>document.write(navigator.taintEnabled())</script>
    </td>
  </tr>
</table>
</body>
</html>
登录后复制


相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板