Identify the operating system is not Vista JS code _javascript Tips

Source: Internet
Author: User
How to use ASP to identify the operating system is Vista? I found a function on the Internet, but I can not judge the Vista system, I hope everyone 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, ">0") Then
Getcurros = "Windows 98"
ElseIf Instr (info, ">0") Then
Getcurros = "Windows 95"
Else
Getcurros = "Unknow"
End If
End Function
If we have a better function, but also to the younger brother, I first thanked.
<! 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" > <pead> <meta http-equiv= "Content-type" content=; Charset=utf-8 "/> <title>codetrinis test</title> </pead> <body> <script type=" Text/java Script > <!--if ((Navigator.userAgent.indexOf (' NT 6.0 ') > 0) && (navigator.userAgent.indexOf (' CLR 3.0.04506 ') > 0)) alert (' you\ ' re using Microsoft Windows Vista); else alert (' You aren\ ' t using Microsoft Windows Vista '); --> </script> </body> </ptml>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.