随机选取列表中的一个字符串_一个获得随机字符串的asp函数

时间:2014-07-12  来源:php函数  阅读:
response.write getCode(10) "得到一个长度为10 的随机字符串
Function getCode(iCount)
Dim arrChar
Dim j,k,strCode
arrChar = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
k=Len(arrChar)
Randomize
For i=1 to iCount
j=Int(k * Rnd )+1
strCode = strCode & Mid(arrChar,j,1)
Next
getCode = strCode
End Function

随机选取列表中的一个字符串_一个获得随机字符串的asp函数

http://m.bbyears.com/jiaocheng/7745.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新