国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

網上用的比較多的asp級聯菜單效果代碼

2020-07-27 13:01:03
字體:
來源:轉載
供稿:網友

復制代碼 代碼如下:

<!--#include file="conn.asp"--> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"> 
<meta name="ProgId" content="FrontPage.Editor.Document"> 
<title>New Page 1</title> 
</head> 
<body> 
<% 
dim rs 
dim sql 
dim count 
set rs=server.createobject("adodb.recordset") 
sql = "select * from shiinfo order by id asc" 
rs.open sql,conn,1,1 
%> 

<SCRIPT language="JavaScript"> 
var onecount; 
onecount=0; 
subcat = new Array(); 
<% 
count = 0 
do while not rs.eof  
%> 
subcat[<%=count%>] = new Array("<%= trim(rs("shiname"))%>","<%= trim(rs("shengcode"))%>","<%= trim(rs("id"))%>"); 
<% 
count = count + 1 
rs.movenext 
loop 
rs.close 
%> 
onecount=<%=count%>; 
function changelocation(locationid) 

document.form1.cid.length = 0;  
var locationid=locationid; 
var i; 
for (i=0;i < onecount; i++) 

if (subcat[i][1] == locationid) 
{  
document.form1.cid.options[document.form1.cid.length] = new Option(subcat[i][0], subcat[i][2]); 
}  

}  

</SCRIPT> 
<SCRIPT language="javascript"> 
<!-- 
function CheckForm() 

document.form1.txtcontent.value=document.form1.doc_html.value; 
return true 

//--> 
</SCRIPT> 
<form name=form1 onsubmit="check()"> 
省份 <% 
sql = "select * from shenginfo" 
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
response.write "請先添加省份。" 
response.end 
else 
%> 
<Select name="sid" onChange="changelocation(document.form1.sid.options[document.form1.sid.selectedIndex].value)" ><%  
do while not rs.eof 
%><OPTION selected value="<%=trim(rs("id"))%>"><%=trim(rs("shengname"))%></OPTION> 
<% 
rs.movenext 
loop 
end if 
rs.close 
%> 
</Select>  
城市:<Select name="cid"> 
<OPTION selected value="">==請選城市==</OPTION> 
</Select> 
</form> 
</body> 
</html>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 随州市| 潼关县| 磐安县| 沙洋县| 奉新县| 楚雄市| 会宁县| 响水县| 东乡| 威信县| 河北省| 瑞丽市| 临邑县| 中西区| 凤庆县| 西昌市| 松原市| 恭城| 灌云县| 扬中市| 平乡县| 东乌| 乐业县| 正镶白旗| 兰州市| 仙游县| 耒阳市| 岳普湖县| 昂仁县| 新竹县| 阿合奇县| 沈阳市| 象山县| 乌鲁木齐市| 平利县| 扶绥县| 高淳县| 遂川县| 和硕县| 金坛市| 南投市|