一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

asp+js实现二级下拉菜单

时间:2008-07-30 编辑:简简单单 来源:一聚教程网






                     
<%
       sql = "select *  from p_type where b_type=1"
       set rsClass = server.CreateObject("adodb.recordset")
       rsClass.open sql,conn,1,1
       
       '大类
       if not (rsClass.bof and rsClass.eof) then
%>

    <% while not rsClass.eof %>

  •          <%=rsClass("name")%>
           

             <%
                '访二类产品
             sql = "Select * from s_p_type where type=" & rsClass("id") &" order by sort asc"
             set rsSmall = server.CreateObject("adodb.recordset")
             rsSmall.open sql,conn,1,1
             i=1
             while not rsSmall.eof
         %>
             
    • " onfocus="this.blur()">    <%=rsSmall("name")%>

    •               <%
                     i=i+1
                    rsSmall.movenext
                    Wend
                    set rsSmall = nothing
                     %>
         



  • <%
           rsClass.movenext
           wend
    %>


<%
       end if
       rsClass.close
       set rsClass = nothing
%>



       

热门栏目