復制代碼 代碼如下:
<%
'系統分配隨機密碼
Function Createpass()
Dim Ran, i, LengthNum
LengthNum = 6
Createpass = ""
For i = 1 To LengthNum
Randomize
Ran = CInt(Rnd * 2)
Randomize
If Ran = 0 Then
Ran = CInt(Rnd * 25) + 97
Createpass = Createpass & UCase(Chr(Ran))
ElseIf Ran = 1 Then
Ran = CInt(Rnd * 9)
Createpass = Createpass & Ran
ElseIf Ran = 2 Then
Ran = CInt(Rnd * 25) + 97
Createpass = Createpass & Chr(Ran)
End If
Next
End Function
response.write createpass()
%>