您正在使用 IPV4 [18.97.14.86] 访问本站,您本次已经查看了 1 页
用户名: 密 码: 验证码:     用QQ登录本站
首页 软件 编程 笑话 知识 公告 台风 日历 计算器
[公益]保护绿色环境,构建和谐社会      

【腾讯云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折      
[公益] 地球是我家,绿化靠大家      
2025年 春 节 011
2025年 高 考 140
2025年 春 节 011
2026年 元 旦 348
 
您现在的位置:首页 >> ASP/ASP.net >> 内容
本类新增
本类热门
网上用的比较多的asp级联菜单效果代码
内容摘要: !--#includefile='conn.asp'--htmlheadmetahttp-equiv='Content-Type'content='text/html;charset=gb2312'metaname='GENERATOR'content='MicrosoftFrontPage4.0'metaname='ProgId'content='Fron......
<!--#includefile="conn.asp"-->

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">

<metaname="GENERATOR"content="MicrosoftFrontPage4.0">

<metaname="ProgId"content="FrontPage.Editor.Document">

<title>NewPage1</title>

</head>

<body>

<%

dimrs

dimsql

dimcount

setrs=server.createobject("adodb.recordset")

sql="select*fromshiinfoorderbyidasc"

rs.opensql,conn,1,1

%>

<SCRIPTlanguage="JavaScript">

varonecount;

onecount=0;

subcat=newArray();

<%

count=0

dowhilenotrs.eof

%>

subcat[<%=count%>]=newArray("<%=trim(rs("shiname"))%>","<%=trim(rs("shengcode"))%>","<%=trim(rs("id"))%>");

<%

count=count+1

rs.movenext

loop

rs.close

%>

onecount=<%=count%>;

functionchangelocation(locationid)

{

document.form1.cid.length=0;

varlocationid=locationid;

vari;

for(i=0;i<onecount;i++)

{

if(subcat[i][1]==locationid)

{

document.form1.cid.options[document.form1.cid.length]=newOption(subcat[i][0],subcat[i][2]);

}

}

}

</SCRIPT>

<SCRIPTlanguage="javascript">

<!--

functionCheckForm()

{

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

returntrue

}

//-->

</SCRIPT>

<formname=form1onsubmit="check()">

省份<%

sql="select*fromshenginfo"

rs.opensql,conn,1,1

ifrs.eofandrs.bofthen

response.write"请先添加省份。"

response.end

else

%>

<Selectname="sid"onChange="changelocation(document.form1.sid.options[document.form1.sid.selectedIndex].value)"><%

dowhilenotrs.eof

%><OPTIONselectedvalue="<%=trim(rs("id"))%>"><%=trim(rs("shengname"))%></OPTION>

<%

rs.movenext

loop

endif

rs.close

%>

</Select>

城市:<Selectname="cid">

<OPTIONselectedvalue="">==请选城市==</OPTION>

</Select>

</form>

</body>

</html>

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:防止网页后退 asp禁止缓存

 

下一篇:ASP获取网页全部图片地址并保存为数组的正则

发布日期:2023/7/7
手机扫二维码直达本页
发布时间:13:34:31
点  击:9
录  入:壹家怡园
相关文章
Baidu
YiJiaCMS 7.5.5 build241121(MSSQL) 闽ICP备05000814号-1
本空间由腾讯云(轻量应用服务器)提供,创宇云安全提供加速防护
运行时间载入中.....
知道创宇云安全