给你一个两级的,自己改吧
<SCRIPT language=JavaScript>
<!-- Begin
var hy_arry = new Array();
var hy_arrgrp = new Array();
<%
dim i
i=0
bigsql="select * from jiamei_big_product order by id"
set bigrs=conn.execute(bigsql)
do while not bigrs.eof
smallsql="select * from jiamei_small_product where big_product='"&bigrs("big_product")&"'"
set smallrs=conn.execute(smallsql)
do while not smallrs.eof
%>
hy_arry[<%= i %>] ="<%= trim(smallrs("small_product")) %>";
hy_arrgrp[<%= i %>] ="<%= bigrs("big_product") %>";
<%
smallrs.movenext
i=i+1
loop
bigrs.movenext
i=i+1
loop
%>
function selectChange(control, controlToPopulate, ItemArray, GroupArray)
{
var myElee ;
var x ;
// Empty the second drop down box of any choices
for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
// ADD Default Choice - in case there are no values
myElee = document.createElement("option") ;
myElee.value = "" ;
myElee.text = "请选择产品小类" ;
controlToPopulate.add(myElee) ;
for ( x = 0 ; x < ItemArray.length ; x++ )
{
if ( GroupArray[x] == control.value )
{
myElee = document.createElement("option") ;
myElee.value = ItemArray[x] ;
myElee.text = ItemArray[x] ;
controlToPopulate.add(myElee) ;
}
}
}
// End -->
</SCRIPT>