asp 随机字符串函数
时间:2021-07-07 08:51:09|栏目:ASP代码|点击: 次
'*************************************
'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计算随机数
'*************************************
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下用replace非正则实现代码运行功能的代码
栏 目:ASP代码
下一篇:ASP基础入门第四篇(脚本变量、函数、过程和条件语句)
本文标题:asp 随机字符串函数
本文地址:http://www.codeinn.net/misctech/153743.html