网络编程 
首页 > 网络编程 > 浏览文章

asp 随机字符串函数

(编辑:jimmy 日期: 2024/10/9 浏览:3 次 )
'*************************************
'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
上一篇:asp form 表单验证函数
下一篇:asp 读取文件和保存文件函数代码