级连菜单

<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("addtwo"))%>","<%= trim(rs("addone_id"))%>","<%= trim(rs("addtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount1=<%=count%>;

function changelocation1(addone)
    {
    document.addform.addtwo_id.length = 0;

    var addone_id=addone_id;
    var i;
    document.addform.addtwo_id.options[0] = new Option('请选择市','');
    for (i=0;i < onecount1; i++)
        {
            if (subcat1[i][1] == addone)
            {
                document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
            }       
        }
       
    }
</script>

 <tr>
    <td width="21%" height=50 align=right>展会地区: &nbsp;</td>
 <td width="79%"><p style="line-height:180%"><select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择省</option>
                    <%
sql="select * from ypaddone order by date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("addone_id")%>"><%=rs("addone")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="addtwo_id">
<option selected value="">请选择市</option>
</select><br><font color=#666666>如不选则默认为您的企业所在的地区,国际展会则不用填</font></td>
  </tr>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值