标题:下拉菜单不听使唤了--急!在线等--
只看楼主
woflying
Rank: 2
等 级:论坛游民
帖 子:28
专家分:21
注 册:2008-3-11
结帖率:75%
 问题点数:0 回复次数:0 
下拉菜单不听使唤了--急!在线等--
第一个下拉菜单可以顺利调动后面的小菜单
但第二个就无法调用了!
请高手帮忙!小弟刚学呀


<td width="30%" align="right">选择商品的分类:</td>
                                    <td width="70%">
                                      <%
    rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
    if rs.eof and rs.bof then
    response.write "请先添加栏目。"
    response.end
    else
%>
                                        大类:
<select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
                                        <option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                                        <%      dim selclass
         selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof
%>
                                        <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                                        <%
        rs.movenext
        loop
        end if
        rs.close
%>
                                      </select> 
                                      小类:
<select name="Nclassid">
                                        <%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
                                        <option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                                        <% rs.movenext
do while not rs.eof%>
                                        <option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                                        <% rs.movenext
loop
end if
        rs.close
        set rs = nothing
%>
                                      </select>
                                      </td>
                                      </tr>
                                  <tr >
                                    <td align="right">&nbsp;                                     </td>
                                    <td align="right">
                                      <div align="left">
                                        <%set rs2=server.createobject("adodb.recordset")
    rs2.open "select * from shop_anclass order by anclassidorder",conn,1,1
    if rs2.eof and rs2.bof then
    response.write "请先添加栏目。"
    response.end
    else
    
%>
大类:
<select name="select1" size="1" id="select1" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
    <option selected value="<%=rs2("anclassid")%>"><%=trim(rs2("anclass"))%></option>
    <%      dim selclass2
         selclass2=rs2("anclassid")
        rs2.movenext
        do while not rs2.eof
%>
    <option value="<%=rs2("anclassid")%>"><%=trim(rs2("anclass"))%></option>
    <%
        rs2.movenext
        loop
        end if
      
%>
</select>
  小类:
<select name="select2">
    <%set rs3=server.createobject("adodb.recordset")
    rs3.open "select * from shop_Nclass where anclassid="&selclass2 ,conn,1,1
if not(rs3.eof and rs3.bof) then
%>
    <option selected value="<%=rs3("NclassID")%>"><%=rs3("Nclass")%></option>
    <% rs3.movenext
do while not rs3.eof%>
    <option value="<%=rs3("NclassID")%>"><%=rs3("Nclass")%></option>
    <% rs3.movenext
loop
end if
        rs3.close
        set rs3 = nothing
%>
</select>
                                 </div></td>
搜索更多相关主题的帖子: 菜单 使唤 response anclassid 
2008-04-03 17:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-206993-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.071164 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved