展会信息港展会大全

asp 判断客户端操作系统 android软件开发教程
来源:互联网   发布日期:2016-03-01 11:14:55   浏览:1883次  

导读:判断客户端操作系统 Function GetOs(content,systemOrBrowser) Dim temp temp = Split(content,;) Select Case systemOrBrowser Case 0 If InStr(Content,Windows NT 6.0) Then GetOs = Windows Vista ElseIf InStr(Content,Windows NT 5.2) Then GetOs = Wi...

判断客户端操作系统

Function GetOs(content,systemOrBrowser)

Dim temp

temp = Split(content,";")

Select Case systemOrBrowser

Case 0

If InStr(Content,"Windows NT 6.0") Then

GetOs = "Windows Vista"

ElseIf InStr(Content,"Windows NT 5.2") Then

GetOs = "Windows 2003"

ElseIf InStr(Content,"Windows NT 5.1") Then

GetOs = "Windows XP"

ElseIf InStr(Content,"Windows NT 5.0") Then

GetOs = "Windows 2000"

ElseIf InStr(Content,"Windows NT") Then

GetOs = "Windows NT"

ElseIf InStr(Content,"Windows 9") Then

GetOs = "Windows 9x"

ElseIf InStr(Content,"unix") Then

GetOs = "Unix"

ElseIf InStr(Content,"linux") Then

GetOs = "Linux"

ElseIf InStr(Content,"SunOS") Then

GetOs = "SunOS"

ElseIf InStr(Content,"BSD") Then

GetOs = "BSD"

ElseIf InStr(Content,"Mac") Then

GetOs = "Mac"

Else

GetOs = "Other"

End If

Case 1

If InStr(content,"Opera") Then

GetOs = Replace(Left(content,InStr(content,"(") - 1),"/"," ")

ElseIf InStr(content,"MSIE") > 0Then

GetOs = Trim(temp(1))

Else

GetOs = Replace(Right(temp(4),Len(temp(4)) - InstrRev(temp(4)," ")),"/"," ")

End if

End Select

End Function

赞助本站

人工智能实验室

相关热词: 开发 编程 android

相关内容
AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港