如何做一个随机密码产生器?

所属分类: 网络编程 / 编程10000问 阅读数: 1600
收藏 0 赞 0 分享

<%
genPassword = ""
Randomize
For i = 1 to 8
intNum = Int(10 * Rnd + 48)
intUpper = Int(26 * Rnd + 65)
intLower = Int(26 * Rnd + 97)
intRand = Int(3 * Rnd + 1)
Select Case intRand
Case 1
strPartPass = Chr(intNum)
Case 2
strPartPass = Chr(intUpper)
Case 3
strPartPass = Chr(intLower)
End Select
genPassword = genPassword & strPartPass
Next
response.write(genPassword & "<br>")
%>

'
显示浏览器表头信息和服务器变量
<%
For Each name In Request.ServerVariables
Response.write("<b>"&name&"</b>:<br>")
Response.write(Request.ServerVariables(name))
Next
%>

[1]

更多精彩内容其他人还在看

网上考试设计思路是怎样的?

网上考试设计思路是怎样的?
收藏 0 赞 0 分享

可以让程序告诉我详细的页面错误和数据库连接错误吗?

可以让程序告诉我详细的页面错误和数据库连接错误吗?
收藏 0 赞 0 分享

如何把Recordset转换成彩色的XML文件

如何把Recordset转换成彩色的XML文件
收藏 0 赞 0 分享

如何把URL和邮件地址转换为超级链接?

如何把URL和邮件地址转换为超级链接?
收藏 0 赞 0 分享

如何把一个Excel文件放到ASP页面中去?

如何把一个Excel文件放到ASP页面中去?
收藏 0 赞 0 分享

如何把中文转换为UNICODE?

如何把中文转换为UNICODE?
收藏 0 赞 0 分享

如何编写TOP 10之类的排行榜?

如何编写TOP 10之类的排行榜?
收藏 0 赞 0 分享

如何动态添加Form项?

如何动态添加Form项?
收藏 0 赞 0 分享

如何读取一个.ini文件?

如何读取一个.ini文件?
收藏 0 赞 0 分享

如何计算ASP页面的载入时间?

如何计算ASP页面的载入时间?
收藏 0 赞 0 分享
查看更多