asp 生成任意英文+數(shù)字位數(shù)長度的隨機(jī)碼函數(shù)
更新時(shí)間:2007年08月08日 12:10:46 作者:
<%
'******************************
'函數(shù):Generator(Length)
'參數(shù):Length,任意長度的數(shù)值,隨機(jī)碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長度的隨機(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,任意長度的數(shù)值,隨機(jī)碼位數(shù)
'作者:阿里西西
'日期:2007/7/15
'描述:生成任意英文+數(shù)字位數(shù)長度的隨機(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 javascript picasa相冊(cè)外鏈批量導(dǎo)出
自己的空間想做一個(gè)相冊(cè),找來找去用了picasa,功能很方便,唯一不足之處是獲取外鏈太麻煩,一個(gè)一個(gè)的復(fù)制粘貼太辛苦,于是用asp+javascript的方法寫了個(gè)簡單的程序2009-05-05
UpdatePanel觸發(fā)javascript腳本的方法附代碼
UpdatePanel觸發(fā)javascript腳本的方法附代碼...2007-10-10
asp中利用CSW中文分詞組件來實(shí)現(xiàn)自己網(wǎng)站的內(nèi)容關(guān)鍵詞自動(dòng)提取
asp中利用CSW中文分詞組件來實(shí)現(xiàn)自己網(wǎng)站的內(nèi)容關(guān)鍵詞自動(dòng)提取...2007-03-03
asp實(shí)現(xiàn)過濾關(guān)鍵字的函數(shù)
asp實(shí)現(xiàn)過濾關(guān)鍵字的函數(shù)...2007-08-08
asp中去除html中style,javascript,css代碼
剔除頁面中html中除文字以外的任何代碼,剛才發(fā)布了php版這個(gè)是ASP中的版本。2010-10-10

