网络编程
位置:首页>> 网络编程>> Asp编程>> asp 随机字符串函数

asp 随机字符串函数

 来源:asp之家 发布时间:2011-04-04 11:01:00 

标签: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

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com