当前位置:编程学习 > asp >>

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

答案:

<%
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]

上一个:如何在网站中插播广告?
下一个:如何实现点击数的计算?

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,