JS脚本:
<%
dim rs
dim sql
dim count
dim rs1
dim sql1
sql = "select * from region order by zoneid asc"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("regionname"))%>","<%= trim(rs("zoneid"))%>","<%= trim(rs("regionid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;
function changelocation(zoneid)
{
document.myform.region.length = 0;
var zoneid=zoneid;
var i;
document.myform.region.options[0] = new Option('--地区--','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == zoneid)
{
document.myform.region.options[document.myform.region.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
表单内容:
<table>
<form>
<tr>
<td>
<span class="STYLE1">*</span> 大区:
<select name="zone" size="1" id="zone" onChange="changelocation(document.myform.zone.options[document.myform.zone.selectedIndex].value)">
<option value=0 selected >请选择</option>
<%
sql1 = "select * from bigzone order by zonename asc"
set rs1 = server.createobject("adodb.recordset")
rs1.open sql1,conn,1,3
%>
<%while not rs1.eof%>
<option value="<%=rs1("zoneid")%>"><%=rs1("zonename")%></option>
<%rs1.movenext
wend
rs1.close
set rs1 = nothing
%>
</select> </td>
<td width="20%"><span class="STYLE1">*</span>地区:
<select name="region" size="1" id="region" >
<option value=0 selected >请选择</option>
</select>
</tr>
</form>
</table>
<%
dim rs
dim sql
dim count
dim rs1
dim sql1
sql = "select * from region order by zoneid asc"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("regionname"))%>","<%= trim(rs("zoneid"))%>","<%= trim(rs("regionid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;
function changelocation(zoneid)
{
document.myform.region.length = 0;
var zoneid=zoneid;
var i;
document.myform.region.options[0] = new Option('--地区--','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == zoneid)
{
document.myform.region.options[document.myform.region.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
表单内容:
<table>
<form>
<tr>
<td>
<span class="STYLE1">*</span> 大区:
<select name="zone" size="1" id="zone" onChange="changelocation(document.myform.zone.options[document.myform.zone.selectedIndex].value)">
<option value=0 selected >请选择</option>
<%
sql1 = "select * from bigzone order by zonename asc"
set rs1 = server.createobject("adodb.recordset")
rs1.open sql1,conn,1,3
%>
<%while not rs1.eof%>
<option value="<%=rs1("zoneid")%>"><%=rs1("zonename")%></option>
<%rs1.movenext
wend
rs1.close
set rs1 = nothing
%>
</select> </td>
<td width="20%"><span class="STYLE1">*</span>地区:
<select name="region" size="1" id="region" >
<option value=0 selected >请选择</option>
</select>
</tr>
</form>
</table>
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年11月20日
2024年11月20日
- 模拟之声慢刻CD《声入人心[年度发烧人声严选]》[低速原抓WAV+CUE]
- 陈致逸《幻想乐园 Fantasyland》[FLAC/分轨][554.27MB]
- Rhymist / LusciousBB《年轮》[320K/MP3][76.52MB]
- Rhymist / LusciousBB《年轮》[FLAC/分轨][410.02MB]
- 群星《歌手2024 第11期》[320K/MP3][93.88MB]
- 群星《歌手2024 第11期》[FLAC/分轨][496.06MB]
- 群星《国风超有戏 第7期》[320K/MP3][30.73MB]
- 模拟之声慢刻CD《试音天品8[女声低音炮]》[低速原抓WAV+CUE]
- 群星《抖烧第三季DSD》[低速原抓WAV+CUE]
- [ABC]蔡琴《百万琴歌[6N纯银镀膜]》[低速原抓WAV+CUE]
- 群星《国风超有戏 第7期》[FLAC/分轨][147.99MB]
- 群星《闪光的夏天 第3期》[320K/MP3][61.94MB]
- 群星《闪光的夏天 第3期》[FLAC/分轨][336MB]
- 【迷幻电音】Elea-2024-Hypnos(FLAC)
- 【民族融合】VA-2024-TheOrientCollective:GoldenSand(FLAC)