当前位置:首页 > ASP教程 > 应用技巧

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

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!