以下はコードフラグメントです。 <% 関数makepassword(byval maxlen) dim strnewpass dim whatsnext、上、下、intcounter ランダム化 intcounter = 1からmaxlenへ whatsnext = int((1-0 1) * rnd 0) whatsnext = 0の場合 上部= 90 低= 65 それ以外 上部= 57 低= 48 ifを終了します strnewpass = strnewpass&chr(inchete -lower 1) * rnd lower) 次 makepassword = strnewpass エンド関数 'パスワードの長さを指定し、関数を呼び出します Response.write makepassword(16) %> |