asp 生成任意英文+數(shù)字位數(shù)長(zhǎng)度的隨機(jī)碼函數(shù)
更新時(shí)間:2007年08月08日 12:10:46 作者:
<%
'******************************
'函數(shù):Generator(Length)
'參數(shù):Length,任意長(zhǎng)度的數(shù)值,隨機(jī)碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長(zhǎng)度的隨機(jī)碼函數(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,任意長(zhǎng)度的數(shù)值,隨機(jī)碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長(zhǎng)度的隨機(jī)碼函數(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
%>
相關(guān)文章
ASP獲取數(shù)據(jù)庫(kù)表名、庫(kù)名、字段名的方法
這篇文章主要介紹了ASP獲取數(shù)據(jù)庫(kù)表名、庫(kù)名、字段名的方法,本文例子使用的是SqlServer數(shù)據(jù)庫(kù),需要的朋友可以參考下2014-07-07asp下用實(shí)現(xiàn)模板加載的的幾種方法總結(jié)
asp下html模板的加載方法,一般有以下幾種,大家可以根據(jù)情況自己決定,結(jié)果都是一樣的,都是好方法2008-01-01asp下實(shí)現(xiàn)記錄集內(nèi)隨機(jī)取記錄的代碼
asp下實(shí)現(xiàn)記錄集內(nèi)隨機(jī)取記錄的代碼...2007-11-11asp中將有雙引號(hào)標(biāo)題入庫(kù)的方法
asp中將有雙引號(hào)標(biāo)題入庫(kù)的方法,需要的朋友可以參考下2012-10-10ASP下的簡(jiǎn)潔的多重查詢的方法與函數(shù) 真不錯(cuò)
ASP下的簡(jiǎn)潔的多重查詢的方法與函數(shù) 真不錯(cuò)...2007-10-10