系统分配随机密码

网络编程 2021-07-05 10:58www.168986.cn编程入门
代码如下:

<%
'系统分配随机密码
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()
%>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by