tab导航菜单代码 从数据库中循环盗用

来源:百度知道 编辑:UC知道 时间:2024/09/23 13:31:50
tab导航菜单代码 从数据库中循环盗用tab导航菜单代码 从数据库中循环盗用

<ul>
<%set rsRoot=server.createobject("adodb.recordset")
sql="select * From MenuClass where Depth=0 and ShowOnTop=True order by

RootID"
rsRoot.open sql,conn,1,1
do while not rsRoot.eof
ParentID=rsroot("classID")%>
<li><a href="<%=rsroot("linkurl")%>"><%=rsroot

("Classname")%></a>

<ul>
<%set rsRoot1=server.createobject("adodb.recordset")
sql1="select * From MenuClass where Depth=1 and ShowOnTop=True and

ParentID="& ParentID &" order by RootID"
rsRoot1.open sql1,conn,1,1
do while not rsRoot1.eof%>
<li><a href="<%=rsroot1("linkurl")%>"><%=rsroot1("Classname")%></a></li>
<%RSROOT1.MOVENEXT
LOOP
RSROOT1=NOTHING
RSROOT1.CLOSE%>
</ul>