ASP常用函数收藏乱七八糟未整理版(41)
Response.Write "</script>"
End Sub
'*******************************************************************
' 判断数字是否整形
'*******************************************************************
Function isInteger(para)
On Error Resume Next
Dim Str
Dim l, i
If IsNull(para) Then
isInteger = False
Exit Function
End If
Str = CStr(para)
If Trim(Str) = "" Then
isInteger = False
Exit Function
End If
l = Len(Str)
For i = 1 To l
If Mid(Str, i, 1)>"9" or Mid(Str, i, 1)<"0" Then
isInteger = False
Exit Function
End If
Next
isInteger = True
If Err.Number<>0 Then Err.Clear
End Function
'*******************************************************************
' 获得文件扩展名
'*******************************************************************
Function GetExtend(filename)
Dim tmp
If filename<>"" Then
tmp = Mid(filename, instrrev(filename, ".") + 1, Len(filename) - instrrev(filename, "."))
tmp = LCase(tmp)
If InStr(1, tmp, "asp")>0 or InStr(1, tmp, "php")>0 or InStr(1, tmp, "php3")>0 or InStr(1, tmp, "aspx")>0 Then
getextend = "txt"
Else
getextend = tmp
End If
Else
getextend = ""
End If
内容版权声明:除非注明,否则皆为本站原创文章。