手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp无限分级(递归调用)
asp无限分级(递归调用)
摘要:数据库字段:id(自动编号),class_name(菜单名),parentID(父菜单id)复制代码代码如下:

数据库字段:id(自动编号),class_name(菜单名),parentID(父菜单id)

复制代码 代码如下:

<%

dimm

m=0

callShowTree(0)%>

<%

SubShowTree(parentID)

dims

m=m+1

Dimrs

Setrs=Server.CreateObject("ADODB.RecordSet")

sql="Selectclass_id,class_nameFROM[WMS_Class]whereclass_father_id="&Cint(parentID)

rs.opensql,Conn,1,1

ifrs.eofandm=1then

response.Write("该频道暂无栏目")

endif

DoWhileNotrs.Eof

response.Writers(0)

forn=1tom

ifn=mandm=1then

Response.Write("╋")

elseifn=1then

Response.Write("")

elseifn=mthen

Response.Write("├")

else

Response.Write("│")

endif

next

response.Writers(1)&"<br>"

CallShowTree(rs(0))

m=m-1

rs.Movenext

Loop

EndSub

%>

【asp无限分级(递归调用)】相关文章:

把无限级分类生成数组

asp实现表格3列5行

asp 中英文字符长度检测判断函数

asp调用存储过程

asp写入记录

asp中对ip进行过滤限制函数

asp 删除图片与文件函数

文件遍历排序函数

asp中for循环的使用方法

asp数个使用技巧

精品推荐
分类导航