网络编程
位置:首页>> 网络编程>> JavaScript>> 识别操作系统是不是vista的js代码

识别操作系统是不是vista的js代码

  发布时间:2013-10-20 19:08:25 

标签:识别操作系统是不是vista的js代码

如何用ASP来识别操作系统是vista的?我在网上找了个函数,但是不能判断是vista系统,希望大家帮忙.
这个是我在网上找的函数:
Function GetCurrOS()
Dim Info
Info = navigator.appVersion 
If Instr(info,"NT 5.1")>0 Then
GetCurrOS = "Windows XP"
ElseIf Instr(info,"Tel")>0 Then
GetCurrOS = "Telport"
ElseIf Instr(info,"webzip")>0 Then
GetCurrOS = "webzip"
ElseIf Instr(info,"flashget")>0 Then
    GetCurrOS = "flashget"
ElseIf Instr(info,"offline")>0 Then
GetCurrOS = "offline"
ElseIf Instr(info,"NT 5")>0 Then
GetCurrOS = "Windows 2000"
ElseIf Instr(info,"NT 4")>0 Then
GetCurrOS = "Windows NT4"
ElseIf Instr(info,"98")>0 Then
GetCurrOS = "Windows 98"
ElseIf Instr(info,"95")>0 Then
GetCurrOS = "Windows 95"
Else
GetCurrOS = "UnKnow"
End If
End Function
如果大家还有更好的函数,也给小弟一个,我先谢过了.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Codetrinis Test</title> </head> <body> <script type="text/javascript">  </script> </body> </html>


0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com