asp 生成任意英文+數(shù)字位數(shù)長度的隨機碼函數(shù)
更新時間:2007年08月08日 12:10:46 作者:
<%
'******************************
'函數(shù):Generator(Length)
'參數(shù):Length,任意長度的數(shù)值,隨機碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長度的隨機碼函數(shù)
'示例:Generator(80)
'******************************
Function Generator(Length)
Dim i, tempS
tempS = "abcdefghijklmnopqrstuvwxyz1234567890"
Generator = ""
If isNumeric(Length) = False Then
Exit Function
End If
For i = 1 to Length
Randomize
Generator = Generator & Mid(tempS,Int((Len(tempS) * Rnd) + 1),1)
Next
End Function
%>
'******************************
'函數(shù):Generator(Length)
'參數(shù):Length,任意長度的數(shù)值,隨機碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長度的隨機碼函數(shù)
'示例:Generator(80)
'******************************
Function Generator(Length)
Dim i, tempS
tempS = "abcdefghijklmnopqrstuvwxyz1234567890"
Generator = ""
If isNumeric(Length) = False Then
Exit Function
End If
For i = 1 to Length
Randomize
Generator = Generator & Mid(tempS,Int((Len(tempS) * Rnd) + 1),1)
Next
End Function
%>
相關文章
asp下用實現(xiàn)模板加載的的幾種方法總結(jié)
asp下html模板的加載方法,一般有以下幾種,大家可以根據(jù)情況自己決定,結(jié)果都是一樣的,都是好方法2008-01-01