Asp生成13位隨機(jī)字符串_ASP教程
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
推薦:ASP+AJAX做類似google的搜索提示主要要文件有: Index.html實(shí)現(xiàn)功能,一個(gè)文本框,輸入內(nèi)容并實(shí)現(xiàn)提示 search.asp查詢功能,讓文本框輸入的內(nèi)容在數(shù)據(jù)庫(kù)中查詢,然后返回給客戶端 conn.asp數(shù)據(jù)庫(kù)連接功能,實(shí)現(xiàn)與數(shù)據(jù)庫(kù)相連 xmlhttp.jsAJAX核心部分,用來(lái)把客戶端的數(shù)據(jù)傳給服務(wù)端,再把服務(wù)端的數(shù)據(jù)
<html><title>
</title>
<body>
<%
Function gen_key(digits)
’定義并初始化數(shù)組
dim char_array(80)
’初始化數(shù)字
For i = 0 To 9
char_array(i) = CStr(i)
Next
’初始化大寫字母
For i = 10 To 35
char_array(i) = Chr(i + 55)
Next
’初始化小寫字母
For i = 36 To 61
char_array(i) = Chr(i + 61)
Next
Randomize Timer’初始化隨機(jī)數(shù)生成器。
do while len(output) < digits
num = char_array(Int((62 - 0 + 1) * Rnd + 0))
output = output + num
loop
’設(shè)置返回值
gen_key = output
End Function
’把結(jié)果返回給瀏覽器
response.write "本實(shí)例生成的十三位隨機(jī)字符串為:"
response.write "<center>"
response.write gen_key(13)
response.write "</center>"
%>
</body>
</html>
分享:如何用Asp取得數(shù)據(jù)庫(kù)中所有表名和字段名% set rs=server.CreateObject(adodb.recordset) db= db.mdb '只要直接更改數(shù)據(jù)庫(kù)名稱就能夠看到效果了。 set conn=server.CreateObject(adodb.connection) connstr=Provider=Microsoft.Jet.OLEDB.4.0;Data Source= Server.MapPath(db) conn.open c
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- ADO初學(xué)者教程:ADO 顯示
- ASP調(diào)用web services
- ASP常見(jiàn)數(shù)學(xué)函數(shù) Abs Atn Cos 等詳細(xì)詳解
- 技巧:用GetString來(lái)提高ASP的速度
- ASP實(shí)例 掛QQ的網(wǎng)頁(yè)源代碼ASP/PHP
- asp中設(shè)置session過(guò)期時(shí)間方法總結(jié)
- ASP中set與dim的區(qū)別(自己的理解)
- 設(shè)計(jì)ASP用戶的登錄模塊
- 關(guān)于阻止灌水留言的一個(gè)方法(隨機(jī)生成的4位認(rèn)證碼)
- ASP request.from 教程
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-Asp生成13位隨機(jī)字符串
。