Maison >interface Web >js tutoriel >识别操作系统是不是vista的js代码_javascript技巧
如何用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
如果大家还有更好的函数,也给小弟一个,我先谢过了.