首页 > 编程 > ASP > 正文

asp 随机字符串函数

2020-07-27 12:55:39
字体:
来源:转载
供稿:网友
'*************************************
'asp计算随机数
'*************************************

Function randomStr(intLength)
Dim strSeed, seedLength, pos, Str, i
strSeed = "abcdefghijklmnopqrstuvwxyz1234567890"
seedLength = Len(strSeed)
Str = ""
Randomize
For i = 1 To intLength
Str = Str + Mid(strSeed, Int(seedLength * Rnd) + 1, 1)
Next
randomStr = Str
End Function
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表