Home > Article > Web Front-end > js code to identify whether the operating system is vista_javascript skills
How to use ASP to identify that the operating system is Vista? I found a function on the Internet, but I can’t tell if it is a Vista system. I hope you can help.
This is the function I found on the Internet:
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
If you have a better function, please give one to me. Thanks in advance.