ASP常用函数收藏乱七八糟未整理版(61)
upper = 80
lower = 70
Else
upper = 48
lower = 39
End If
strNewPass = strNewPass & Chr(Int((upper - lower + 1) * Rnd + upper))
Next
makerndid = strNewPass
End Function
Rem - - - 生成四位随机数 Being - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CODE Copy ...
Function get_rand()
Dim num1
Dim rndnum
Randomize
Do While Len(rndnum)<4
num1 = CStr(Chr((57 -48) * Rnd + 48))
rndnum = rndnum&num1
Loop
get_rand = rndnum
End Function
Rem - - - 判断数据是否整型 Being - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CODE Copy ...
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
内容版权声明:除非注明,否则皆为本站原创文章。