js读取IE浏览器相关信息

<html xmlns:ie>

<head>
<title>www.cuiz.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
@media all {
   IE":CLIENTCAPS {behavior:url(#default#clientCaps)}
}
-->
</style>
<style type="text/css">
p, td, input { font-style: normal; font-variant: normal; font-weight: normal; font-size: 9pt;
               font-family: 宋体, 'MS Song'; cursor: default;padding:3px}
body         { font-style: normal; font-variant: normal; font-weight: normal; font-size: 9pt;
               font-family: 宋体, 'MS Song'; color: windowtext;
               background-color: menu; background-repeat: repeat;
               background-attachment: scroll; background-position: 0% }
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0">

<IE:CLIENTCAPS ID="oClientCaps" />
<table width="476" border="0" cellspacing="1" cellpadding="0" class="sm9pt" bgcolor="#1892B5" align=center>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">浏览器类型</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.appName)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">浏览器版本</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.appVersion)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">浏览器语言</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.browserLanguage)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">CPU类型</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.cpuClass)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">操作系统</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.platform)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">系统语言</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.systemLanguage)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">用户语言;</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.userLanguage)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">在线情况</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.onLine)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">屏幕分辨率</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">      <script>document.write(window.screen.width+"x"+window.screen.height)</script></td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">颜色</td>
    <td width="389" class="td1" bgcolor="#FFFFFF"> <script>document.write(window.screen.colorDepth+"位")< /script></td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">字体平滑</td>
    <td width="389" class="td1" bgcolor="#FFFFFF"><script>document.write(window.screen.fontSmoothingEnabled)</script></td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">更新版本</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.appMinorVersion)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">appCodeName</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.appCodeName)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">cookieEnabled</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.cookieEnabled)</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">userAgent</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.userAgent)</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">javaEnabled</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(navigator.javaEnabled())</script>
    </td>
  </tr>
  <tr>
    <td width="73"  bgcolor="#FFFFFF">taintEnabled</td>
    <td width="389"  bgcolor="#FFFFFF">
      <script>document.write(navigator.taintEnabled())</script>
    </td>
  </tr>
  <tr>
    <td width="73" class="td1" bgcolor="#FFFFFF">connectionType</td>
    <td width="389" class="td1" bgcolor="#FFFFFF">
      <script>document.write(oClientCaps.connectionType)</script>
    </td>
  </tr>
</table>
<script Language="javascript">
if (oClientCaps.connectionType == "modem")
alert("没有用宽带呀?还在用猫上网,不过和我一样!");
else if(oClientCaps.connectionType == "offline")
alert("怎么没有上网?")
</script>
</body>
</html>

posted @ 2008-09-23 16:08  joinger  阅读(341)  评论(0编辑  收藏  举报