常用ASP函数集【经验才是最重要的】(4)


elseif instr(vibo_soft,"98") then
    msm="Windows 98"
elseif instr(vibo_soft,"Windows 95") then
    msm="Windows 95"
elseif instr(vibo_soft,"Win32") then
    msm="Win32"
elseif instr(vibo_soft,"unix") or instr(vibo_soft,"linux") or instr(vibo_soft,"SunOS") or instr(vibo_soft,"BSD") then
    msm="类Unix"
elseif instr(vibo_soft,"Mac") then
    msm="Mac"
else
    msm="Other"
end if
getsys=msm
End Function

function GetBrowser()
'----------------------------------浏览器版本检测
dim vibo_soft
vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
Browser="unknown"
version="unknown"
'vibo_soft="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.1.4322)"    
If Left(vibo_soft,7) ="Mozilla" Then '有此标识为浏览器
            vibo_soft=Split(vibo_soft,";")
            If InStr(vibo_soft(1),"MSIE")>0 Then
                Browser="Microsoft Internet Explorer "
                version=Trim(Left(Replace(vibo_soft(1),"MSIE",""),6))
            ElseIf InStr(vibo_soft(4),"Netscape")>0 Then
                Browser="Netscape "
                tmpstr=Split(vibo_soft(4),"/")
                version=tmpstr(UBound(tmpstr))
            ElseIf InStr(vibo_soft(4),"rv:")>0 Then
                Browser="Mozilla "
                tmpstr=Split(vibo_soft(4),":")
                version=tmpstr(UBound(tmpstr))
                If InStr(version,")") > 0 Then
                    tmpstr=Split(version,")")
                    version=tmpstr(0)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3170.html