<%function rndNumLetters(num) randomize dim num0,num1,num2,num3,pass if num = "" or not isnumeric(num) or num < 1 then num0 = 6 else num0 = num end if do while len(pass)<num0 '随机密码位数 num1=cstr(chr((57-48)*rnd+48)) num2=cstr(chr((90-65)*rnd+65)) num3=cstr(chr((122-97)*rnd+97)) pass=pass&num1&num2&num3 loop rndNumLetters = passend Function
response.write(rndNumLetters(7))%>
转载于:https://www.cnblogs.com/alex-13/p/3938834.html
相关资源:asp 随机字符串函数