源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

一个强健 实用的asp+ajax二级联动菜单(有演示和附源程序打包下载)

  • 时间:2020-12-27 07:30 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:一个强健 实用的asp+ajax二级联动菜单(有演示和附源程序打包下载)
一个强健 实用的ajax二级联动菜单(有演示和附源程序打包下载)
前些天在搞后台的时候要用到二级联动的菜单,到网上去找了半天也没找到满意的,不是这错就是那错,在选择的时候有时候不能返回.真是郁闷.      后来就看到有人用ajax写了无限级分类(牛,呵呵,本人看不懂.).就想到我那个后台不也可以用ajax试试,虽然比用javascript的慢点,但我这个实用.强健..不会出错,也不会选择某个大类后再返回无选择状态小类为空的状态.呵呵. 文件目录:如图 [img]http://www.sosuo8.com/article/upimages3/g2007718131739.jpg[/img]
主要代码如下: index.asp
[url=http://yeahdown.com/]<!--#include file="iconn.asp"--> <%  Set afeng = Conn.Execute("select bigclassid,bigclassname from bigclass") %> <form id="form1" name="form1" method="post" action="">   <div id="bigclass" style="float:left">   <select name="select" >      <option value="0">选择一级分类</option>       <%If Not afeng.Eof then         Do While Not afeng.Eof             bigclassid= afeng("bigclassid")             bigclassname = afeng("bigclassname")%>             <option value="<%=bigclassid%>"><%=bigclassname%></option>         <%afeng.Movenext         Loop     End If     afeng.Close     Set afeng = Nothing     Conn.Close     Set Conn = Nothing%>   </select>   </div>   <div id="subclass"  style="float:left"><select name="select2">     <option value="0">选择二级分类</option>   </select>   </div> </form> </body> </html>
getsubcategory.asp文件: iconn.asp文件: 
[url=http://files.jb51.net/upload/ajax_category.rar]打包文件下载[/url]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部