日期:2014-05-18  浏览次数:20775 次

如何判断用户 IE版本 及 操作系统?
如何判断用户 IE版本 及 操作系统?

我以前有个判断例子。。但没有 IE7 及最新操作系统 的判断。。。。。请叫大虾如何实现???

------解决方案--------------------
这就看到了

Java code


        Enumeration   e   =   hreq.getHeaderNames(); 
        
        System.out.println("=======================================");   
        while   (e.hasMoreElements())   
        {   
                String   name   =   (String)   e.nextElement();   
                System.out.println(name   +   ":"   +   hreq.getHeader(name));   
        }   
        System.out.println("=======================================");

------解决方案--------------------
<html xmlns:ie>

<head>
<title>VN.ST.-www.51windows.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">用户语言;<