要聯數據庫﹐太麻煩了。
在pconline.com.cn的每日報價有類似的﹐你可以參考一下
在pconline.com.cn的每日報價有類似的﹐你可以參考一下
解决方案 »
- jq使用post提交后返回数据的处理问题
- @@@@请高手帮忙注释一下这段JS代码,以及如何插入一个判断语句?@@@@
- sos
- Js可能造成了死循环? 图片一直在下载, 本地测试是没问题的
- 急,js把dataset转出Excel的时间列问题。
- Javascript 里面这个符号~有什么特殊含义嘛?
- 关于动态添加
- www.msn.com网站,里面注册了它的邮箱后,进入my msn的主页后,它的页面能用鼠标拉动它的任何位置。
- 用createElement动态生成的text,ie 下的事件怎样加载进去
- 请问在javascript中怎样得到某字符再串中出现的次数?
- 求救!!一段javascript代码出现问题,谁能帮帮我!!!!
- 如何改变button的大小?急。
你可以參考一下pconline.com.cn的今日報價
<!--#include file="conn.asp"-->
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim conn
dim rs
dim sql
dim count
dim rs1
dim sql1
sql = "select * from D分局名 order by 分局编号 asc"
set rs = conn.execute(sql)
%>
<script language = "Javascript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%=rs("D分局名")%>","<%=trim(rs("局编号"))%>","<%=trim(rs("分局编号"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;function changelocation(locationid)
{
document.myform.smalllocation.length = 0; 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>
<%
sqlgwdm="select * from D工务段名 order by 编号 asc"
set rsgwdm=conn.execute(sqlgwdm)
%>
<script language = "Javascript">
var onecounty;
onecounty=0;
subcaty = new Array();
<%
county = 0
do while not rsgwdm.eof
%>
subcaty[<%=county%>] = new Array("<%=rsgwdm("D工务段名")%>","<%=trim(rsgwdm("局编号"))%>","<%=trim(rsgwdm("分局编号"))%>","<%=trim(rsgwdm("编号"))%>");
<%
county = county + 1
rsgwdm.movenext
loop
rsgwdm.close
set rsgwdm=nothing
%>
onecounty=<%=county%>;function changelocationy(locationidy)
{
document.myform.gwd.length = 0; var locationidy=locationidy;
var iy;
document.myform.gwd.options[0] = new Option('=所有工务段=','');
for (iy=0;iy < onecounty; iy++)
{
if (subcaty[iy][2] == locationidy)
{
alert(locationidy)
document.myform.gwd.options[document.myform.gwd.length] = new Option(subcaty[iy][0], subcaty[iy][3]);
}
}
}
</script>
</head>
<body>
<form name="myform" method="post">
<select name="biglocation" onChange="changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value)">
<option value="">==所有局名==</option>
<%
sql1 = "select * from D局名 order by 编号 asc"
set rs1 = conn.Execute (sql1)
do while not rs1.eof
%>
<option value="<%=trim(rs1("编号"))%>"><%=trim(rs1("D局名"))%></option>
<%
rs1.movenext
loop
rs1.close
set rs1 = nothing
%>
</select>
<select name="smalllocation" onChange="changelocationy(document.myform.smalllocation.options[document.myform.smalllocation.selectedIndex].value)">
<option selected value="">=所有分局名=</option>
</select>
<select size="1" name="gwd">
<option selected>=所有工务段=</option>
</select>
<input type=button value="yeefly" onclick=javascript:myform.submit();>
</form>
</body>
</html>