手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp 下产生任意位数随机密码的代码
asp 下产生任意位数随机密码的代码
摘要:

<%

'******************************

'函数:MakePassword(byvalmaxlen)

'参数:maxlen,要生成的密码位数长度

'作者:阿里西西

'日期:2007/7/12

'描述:产生任意位数随机密码

'示例:<%=MakePassword(8)%>

'******************************

functionMakePassword(byvalmaxlen)

dimstrnewpass

dimwhatsnext,upper,lower,intcounter

randomize

forintcounter=1tomaxlen

whatsnext=int((1-0+1)*rnd+0)

ifwhatsnext=0then

'character

upper=90

lower=65

else

upper=57

lower=48

endif

strnewpass=strnewpass&chr(int((upper-lower+1)*rnd+lower))

next

makepassword=strnewpass

endfunction

%>

【asp 下产生任意位数随机密码的代码】相关文章:

asp文件上传:文件上传 源代码

asp 在线人数统计代码

asp下载防盗链代码

asp 查询数据代码

asp调用二级分类代码

asp中实现随机分组程序的代码

Asp遍历服务器对象的代码

asp实现的7xi音乐网的采集源代码

asp连接sqlserver数据库实现代码

虚拟主机重启代码

精品推荐
分类导航