日期:2014-05-16  浏览次数:20420 次

帮我实现一个动态联动菜单,送分20!
我的动态联动菜单源代码如下:
<!--#include   file= "conn/conn.asp "-->  

<!--   三级联动菜单   开始   -->
<script   language= "JavaScript ">
<!--
<%
'二级数据保存到数组
Dim   count2,rsClass2,sqlClass2
set   rsClass2=server.createobject( "adodb.recordset ")
sqlClass2= "select   *   from   Sf_class "  
rsClass2.open   sqlClass2,conn,1,1
%>
var   subval2   =   new   Array();
//数组结构:一级根值,二级根值,二级显示值
<%
count2   =   0
do   while   not   rsClass2.eof
%>
subval2[ <%=count2%> ]   =   new   Array( ' <%=rsClass2( "big_id ")%> ', ' <%=rsClass2( "sf_id ")%> ', ' <%=rsClass2( "two_Name ")%> ')
<%
count2   =   count2   +   1
rsClass2.movenext
loop
rsClass2.close
%>

<%
'三级数据保存到数组
Dim   count3,rsClass3,sqlClass3
set   rsClass3=server.createobject( "adodb.recordset ")
sqlClass3= "select   *   from   Ss_class "  
rsClass3.open   sqlClass3,conn,1,1
%>
var   subval3   =   new   Array();
//数组结构:二级根值,三级根值,三级显示值
<%
count3   =   0
do   while   not   rsClass3.eof
%>
subval3[ <%=count3%> ]   =   new   Array( ' <%=rsClass3( "sf_id ")%> ', ' <%=rsClass3( "ss_id ")%> ', ' <%=rsClass3( "three_Name ")%> ')
<%
count3   =   count3   +   1
rsClass3.movenext
loop
rsClass3.close
%>

<%
'三级数据保存到数组
Dim   count4,rsClass4,sqlClass4
set   rsClass4=server.createobject( "adodb.recordset ")
sqlClass4= "select   *   from   St_class "  
rsClass4.open   sqlClass4,conn,1,1
%>
var   subval4   =   new   Array();
//数组结构:二级根值,三级根值,三级显示值
<%
count4   =   0
do   while   not   rsClass4.eof
%>
subval4[ <%=count4%> ]   =   new   Array( ' <%=rsClass4( "ss_id ")%> ', ' <%=rsClass4( "st_id ")%> ', ' <%=rsClass4( "four_Name ")%> ')
<%
count4   =   count4   +   1
rsClass4.movenext
loop
rsClass4.close
%>

function   changeselect1(locationid)
{
            document.form1.s2.length   =   0;
            document.form1.s2.options[0]   =   new   Option( '==请选择类别== ', ' ');
            document.form1.s3.length   =   0;
            document.form1.s3.options[0]   =   new   Option( '==请选择专题== ', ' ');
    document.form1.s4.length   =   0;
            document.form1.s4.options[0]   =   new   Option( '==请选择专题== ', ' ');
            for   (i=0;   i <subval2.length;   i++)
            {