ASP function for getting a random string

xiaoxiao2021-03-06  47

response.write getCode (10) 'to obtain a random string of length Function getCode (iCount) 10 is Dim arrChar Dim j, k, strCode arrChar = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" k = Len (arrChar) Randomize For i = 1 to iCount j = INT (K * RND) 1 Strcode = STRCODE & MID (Arrchar, J, 1) Next getcode = STRCODEEND FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-91267.html

New Post(0)