<% '****************************** '函数:MakePassword(byval maxlen) '参数:maxlen,要生成的密码位数长度 '作者:阿里西西 '日期:2007/7/12 '描述:产生任意位数随机密码 '示例:<%=MakePassword(8)%> '****************************** function MakePassword(byval maxlen) dim strnewpass dim whatsnext, upper, lower, intcounter randomize for intcounter = 1 to maxlen whatsnext = int((1 - 0 + 1) * rnd + 0) if whatsnext = 0 then 'character upper = 90 lower = 65 else upper = 57 lower = 48 end if strnewpass = strnewpass & chr(int((upper - lower + 1) * rnd + lower)) next makepassword = strnewpass end function %>
推荐阅读
asp 读取 utf-8格式文档并生成utf-8格式文档的乱码问题
今天在对搜索吧的程序进行utf-8修正时,发现生成的utf-8格式文档存在着乱码,原来文件 create_html.asp代码如下: 复制代码 代码如下:<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% set objrs=server.createObj>>>详细阅读
本文标题:asp 下产生任意位数随机密码的代码
地址:http://www.17bianji.com/kaifa2/ASP/32491.html
1/2 1