识别操作系统是不是vista的js代码
更新时间:2007年08月26日 15:27:35 作者:
如何用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
如果大家还有更好的函数,也给小弟一个,我先谢过了.
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
这个是我在网上找的函数:
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
如果大家还有更好的函数,也给小弟一个,我先谢过了.
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
相关文章
保证JavaScript和Asp、Php等后端程序间传值编码统一
在WEB开发过程中,前后端要求数据编码一致的处理是经常会碰到的!2009-04-04
使用snowfall.jquery.js实现爱心满屏飞的效果
这篇文章主要介绍了使用snowfall.jquery.js实现爱心满屏飞的效果的相关资料,需要的朋友可以参考下2017-01-01


最新评论