この方法は、小文字と数字のランダムな文字列を生成でき、特殊文字や大文字などを追加できます。 「************************************
'ASP は乱数を計算します
「************************************
関数randomStr(intLength)
Dim strSeed、seedLength、pos、Str、i
strSeed = abcdefghijklmnopqrstuvwxyz1234567890
シード長 = Len(strSeed)
強度 =
ランダム化
For i = 1 to intLength
Str = Str + Mid(strSeed, Int(seedLength * Rnd) + 1, 1)
次
ランダムStr = Str
終了機能