请教大家一个问题,关于三组联动的
<!--#include file="main.asp"--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<HTML xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>中国供应商 - <%=citytitle%></title>
<%=citycss%>
<link href="document/css/css.css" rel="stylesheet" type="text/css"/>
</hand>
<body topmargin="0">
<div class="warp" id="warper">
<!--#include file="top.asp"-->
<div class="content mt">
<!-- 三级联动菜单 开始 -->
<script language="JavaScript">
<!--
<%
'二级数据保存到数组
Dim count2,rsClass2,sqlClass2
set rsClass2=server.createobject("adodb.recordset")
sqlClass2="select * from SMT_ypxxtwo"
rsClass2.open sqlClass2,conn,1,1
%>
var subval2 = new Array();
//数组结构:一级根值,二级根值,二级显示值
<%
count2 = 0
do while not rsClass2.eof
%>
subval2[<%=count2%>] = new Array('<%=rsClass2("SMT_ypxxone_id")%>','<%=rsClass2("SMT_ypxxtwo_id")%>','<%=rsClass2("SMT_ypxxtwo")%>')
<%
count2 = count2 + 1
rsClass2.movenext
loop
rsClass2.close
%>
<%
'三级数据保存到数组
Dim count3,rsClass3,sqlClass3
set rsClass3=server.createobject("adodb.recordset")
sqlClass3="select * from SMT_ypxxthird"
rsClass3.open sqlClass3,conn,1,1
%>
var subval3 = new Array();
//数组结构:二级根值,三级根值,三级显示值
<%
count3 = 0
do while not rsClass3.eof
%>
subval3[<%=count3%>] = new Array('<%=rsClass3("SMT_ypxxtwo_id")%>','<%=rsClass3("SMT_ypxxthird_id")%>','<%=rsClass3("SMT_ypxxthird")%>')//这句话是什么意思??
<%
count3 = count3 + 1
rsClass3.movenext
loop
rsClass3.close
%>
function changeselect1(locationid)
{
document.addform.ypxxtwo_id.length = 0;
document.addform.ypxxtwo_id.options[0] = new Option('==请选择类别==','');
document.addform.ypxxthird_id.length = 0;
document.addform.ypxxthird_id.options[0] = new Option('==请选择专题==','');
for (i=0; i<subval2.length; i++)
{
if (subval2[i][0] == locationid)
{document.addform.ypxxtwo_id.options[document.addform.ypxxtwo_id.length] = new Option(subval2[i][2],subval2[i][1]);}
}
}
function changeselect2(locationid)
{
document.addform.ypxxthird_id.length = 0;
document.addform.ypxxthird_id.options[0] = new Option('==请选择专题==','');
for (i=0; i<subval3.length; i++)
{
if (subval3[i][0] == locationid)
{document.addform.ypxxthird_id.options[document.addform.ypxxthird_id.length] = new Option(subval3[i][2],subval3[i][1]);}
}
}
//-->
</script>
<form name="addform" method="post" action="#">
<%
Dim count1,rsClass1,sqlClass1
set rsClass1=server.createobject("adodb.recordset")
sqlClass1="select * from SMT_ypxxone"
rsClass1.open sqlClass1,conn,1,1
%>
<select name="ypxxone_id" onChange="changeselect1(this.value)">
<option>==请选择大类==</option>
<%
count1 = 0
do while not rsClass1.eof
response.write"<option value="&rsClass1("SMT_ypxxone_id")&">"&rsClass1("SMT_ypxxone")&"</option>"
count1 = count1 + 1
rsClass1.movenext
loop
rsClass1.close
%>
</select>
<select name="ypxxtwo_id" onChange="changeselect2(this.value)">
<option>==请选择小类==</option>
</select>
<select name="ypxxthird_id">
<option>==请选择小小类==</option>
</select>
<input type="button" name="Submit" value="按钮">
</form>
<!-- 三级联动菜单 结束 -->
</div>
<div class=footer>
<div class=copy><%=citybottom%></div>
<div class=frind> </div>
</div>
</div>
</body>
</html>