Asp三級(jí)聯(lián)動(dòng)下拉菜單數(shù)據(jù)庫版(含源程序)(2)_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:關(guān)于阻止灌水留言的一個(gè)方法(隨機(jī)生成的4位認(rèn)證碼)原理:在每次提交留言的時(shí)候,要輸入隨機(jī)生成的4位認(rèn)證碼. 以下代碼用在ASP 生成隨機(jī)4位數(shù): % dim key randomize timer key=Int((8999)*Rnd +1000) % 在表單里顯示: 認(rèn)證碼:%=key% input type=text name=rekey size=8 maxlength=4 input value=%=key
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.smalllocation.length = 0;
document.myform.dlmc0.length = 0;
document.myform.dlmc0.options[0] = new Option(’==請選擇鄉(xiāng)鎮(zhèn)==’,’’);
var locationid=locationid;
var i;
document.myform.smalllocation.options[0] = new Option(’==請選擇縣==’,’’);
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.smalllocation.options[document.myform.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<%sql2 = "select * from village order by districtid asc"
set rs2 = conn.execute(sql2)
%>
<script language = "JavaScript">
var onecount2;
onecount2=0;
subcat2 = new Array();
<%
count2 = 0
do while not rs2.eof
%>
subcat2[<%=count2%>] = new Array("<%= trim(rs2("villagename"))%>","<%= trim(rs2("districtid"))%>","<%= trim(rs2("villagename"))%>");
<%
count2 = count2 + 1
rs2.movenext
loop
rs2.close
set rs2=nothing
%>
onecount2=<%=count2%>;
function changelocation2(villageid)
{
document.myform.dlmc0.length = 0;
var villageid=villageid;
var j;
document.myform.dlmc0.options[0] = new Option(’==請選擇鄉(xiāng)鎮(zhèn)==’,’’);
for (j=0;j < onecount2; j++)
{
if (subcat2[j][1] == villageid)
{
document.myform.dlmc0.options[document.myform.dlmc0.length] = new Option(subcat2[j][0], subcat2[j][2]);
}
}
}
</script>
分享:asp生成HTM靜態(tài)列表分頁(含代碼,已測試成功)!--#include file=conn.asp-- htmlheadTITLE分頁測試/TITLELINK href=inc/style.css type=text/css rel=stylesheet/head %strHead=strHeadhtml strHead=strHeadhead strHead=strHeadTITLE分頁測試/TITLE strHead=strHeadLINK href=inc/style.cs
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
復(fù)制本頁鏈接| 搜索Asp三級(jí)聯(lián)動(dòng)下拉菜單數(shù)據(jù)庫版(含源程序)(2)
- 教程說明:
ASP教程-Asp三級(jí)聯(lián)動(dòng)下拉菜單數(shù)據(jù)庫版(含源程序)(2)
。