Microsoft VBScript 运行时错误 '800a0009' 下标越界: '[number: 4]' 急求!!!
SubSystem_chk()DimAgent,TmpstrIsSearch=FalseBrowser="unknown"version="unknown"platfor...
Sub System_chk()
Dim Agent,Tmpstr
IsSearch = False
Browser="unknown"
version="unknown"
platform="unknown"
Agent=Request.ServerVariables("HTTP_USER_AGENT")
'Agent="Opera/7.23 (X11; Linux i686; U) [en]"
If Left(Agent,7) ="Mozilla" Then '有此标识为浏览器
Agent=Split(Agent,";")
If InStr(Agent(1),"MSIE")>0 Then
Browser="MS IE "
version=Trim(Left(Replace(Agent(1),"MSIE",""),6))
ElseIf InStr(Agent(4),"Netscape")>0 Then 这一行有问题
Browser="Netscape "
tmpstr=Split(Agent(4),"/")
version=tmpstr(UBound(tmpstr))
ElseIf InStr(Agent(4),"rv:")>0 Then
Browser="Mozilla "
tmpstr=Split(Agent(4),":")
version=tmpstr(UBound(tmpstr))
If InStr(version,")") > 0 Then
tmpstr=Split(version,")")
version=tmpstr(0)
End If
End If 展开
Dim Agent,Tmpstr
IsSearch = False
Browser="unknown"
version="unknown"
platform="unknown"
Agent=Request.ServerVariables("HTTP_USER_AGENT")
'Agent="Opera/7.23 (X11; Linux i686; U) [en]"
If Left(Agent,7) ="Mozilla" Then '有此标识为浏览器
Agent=Split(Agent,";")
If InStr(Agent(1),"MSIE")>0 Then
Browser="MS IE "
version=Trim(Left(Replace(Agent(1),"MSIE",""),6))
ElseIf InStr(Agent(4),"Netscape")>0 Then 这一行有问题
Browser="Netscape "
tmpstr=Split(Agent(4),"/")
version=tmpstr(UBound(tmpstr))
ElseIf InStr(Agent(4),"rv:")>0 Then
Browser="Mozilla "
tmpstr=Split(Agent(4),":")
version=tmpstr(UBound(tmpstr))
If InStr(version,")") > 0 Then
tmpstr=Split(version,")")
version=tmpstr(0)
End If
End If 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询