ASP常用函数收藏乱七八糟未整理版(65)
If Dflag = 0 Then‘'取左
pos1 = InStr(str1, charFlag)
If pos1<= 20 Then
tmpstr = Left(str1, pos1 -1)
Else
tmpstr = Mid(str1, pos1 -20, 20)
End If
Else ‘'取右
pos1 = InStr(str1, charFlag) + Len(charFlag)
If Len(str1) - pos1<= 20 Then
tmpstr = Right(str1, Len(str1) - pos1)
Else
tmpstr = Mid(str1, pos1 + 1, 20)
End If
End If
GetStrs = tmpstr
End Function
Rem - - - 取出文件名 - - -
CODE Copy ...
Function GetFileName(Str)
pos = InStr(Str, ".")
If Str<>"" Then
Str = Mid(Str, pos, Len(Str))
End If
GetFileName = Str
End Function
Rem - - - 取到浏览器版本转换字符串 - - -
CODE Copy ...
Function browser()
Dim text
text = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(text, "MSIE 5.5")>0 Then
browser = "IE 5.5"
ElseIf InStr(text, "MSIE 6.0")>0 Then
browser = "IE 6.0"
ElseIf InStr(text, "MSIE 5.01")>0 Then
browser = "IE 5.01"
ElseIf InStr(text, "MSIE 5.0")>0 Then
browser = "IE 5.00"
ElseIf InStr(text, "MSIE 4.0")>0 Then
browser = "IE 4.01"
Else
browser = "未知"
End If
End Function
Rem - - - 取到系统脚本转换字符串 - - -
CODE Copy ...
Function System(text)
If InStr(text, "NT 5.1")>0 Then
内容版权声明:除非注明,否则皆为本站原创文章。