ASP产品大类小类二级联动

来源:百度知道 编辑:UC知道 时间:2024/05/26 20:40:58
<td align="right">选择大类别:</td>
<td><%
set rs=Server.Createobject("ADODB.Recordset")
rs.open "select * from product_class order by paixu",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加产品大类别。"
response.end
else
%>
<select name="select" class="input" id="classid" onChange="changelocation1(document.form_subren.classid.options[document.form_subren.classid.selectedIndex].value)">
<option selected value="<%=rs("id")%>"><%=rs("classname_cn")%></option>
<%dim selclass1
selclass1=rs("id")
rs.movenext
do while not rs.eof
%>
<option value=&

是要无刷新的还是有刷新的?

<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from 班次表 order by 添加时间"
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("班次名称"))%>","<%= trim(rs("科目"))%>","<%= trim(rs("班次名称"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;

function changelocation(locationid)
{
document.form1.sid.length = 0;

var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
i