Client | Browsers a lot of people are asking this question, and here's the answer:
-----------------------------------------
First she wants to use the ASP's Servervarialbles this collection. What role does he have in having such a http_user_agent in Servervarialbles? His role is to get the basic information of the client browser and the version of the operating system, such as what brand of browsers (IE and Netscape are generally), their version number, and so on, I use a program to explain her usage, the file named Checkbrowse.asp.
$U 2 Forum Rautinee original $
$http://u2bbs.126.com$
' ++++++++++++++ below is the body of the program +++++++++++++++++
<HTML>
<HEAD>
<TITLE> Browser Detection </TITLE>
</HEAD>
<BODY>
<%
Dim browsemsg,browseversion,systemversion
Browsemsg=request.servervariables ("Http_user_agent")
' +++++++++++ a basic function to discriminate the operating system +++++++++++
Function Systemcheck ()
If InStr (browsemsg, "Windows then")
systemcheck= "Windows 98"
else if INSTR (browsemsg, "Windows NT 4.0") then
systemcheck= "Windows NT 4.0"
else if INSTR (browsemsg, "Windows NT 5.0") Then
Systemcheck= "Windows NT 2000"
Else
systemcheck= "Unknown type"
End If
End If
End If
End Function
Because of the time reason I did not write the judgment Win95 and the Windows XP statement, the interest Netizen may
' Add yourself: '
' +++++++++++ End +++++++++++
If InStr (browsemsg, "MSIE") Then
Systemversion=cint (Mid (Browsemsg,instr (browsemsg, "MSIE") +5,1))
Response.Write "Your browser version is IE" &BrowseVersion& "<BR>"
Response.Write "Your operating system is" &systemcheck ()
End If
%>
</BODY>
</HTML>
----------------------------------------
Ok,enjoy it and good luck!