我想搞一个三级的菜单用ASP调数据库的(accesss)

richceo 2009-08-09 01:38:16
下面是我的代码我想弄成下拉的菜单希望大虾们的帮助我的代码:
<table width="100" border="0" cellpadding="0"
cellspacing="0"
style="BORDER-RIGHT: #e5e5e5 1px solid; BORDER-TOP: #e5e5e5 1px solid; BORDER-LEFT: #e5e5e5 1px solid; BORDER-BOTTOM: #e5e5e5 1px solid">
<tbody>
<tr>
<td width="70" height="28"><div align="center"><a href="index.asp">首页</a></div></td>
</tr>
<tr>
<td><div align="center">
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from bsort order by anclassidorder",conn,1,1
if rs.recordcount=0 then
response.write "<br>目前没有商品分类"
else
while not rs.eof
%>
</div>
<table width="99%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="22" align="left"><font color="#FF6600"><img src="images/body/orange-bullet.gif" width="9" height="7" /><a href="class.asp?lx=big&anid=<%=rs("anclassid")%>"><font color="#FF4800"><strong><%=rs("anclass")%></strong></font></a></font></td>
</tr>
<%
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from ssort where anclassid=" & rs("anclassid") & " order by nclassidorder",conn,1,1
if rs_s.recordcount=0 then
%>
<tr>
<td height="22" >暂无小分类</td>
</tr>
<%
else
i=0
while not rs_s.eof
%>
<tr>
<td height="11" align="right" ><div align="left"><a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></div></td>
<%rs_s.movenext
if rs_s.eof then
response.write "<td align=center> </td></tr>"
else
%>
</tr>
<tr>
<td height="11" align="right"><div align="left"><a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><%=rs_s("nclass")%></a></div></td>
</tr>
<%
rs_s.movenext
end if%>
<%
wend
end if
%>
</table>
<%
rs_s.close
set rs_s=nothing
rs.movenext
wend
end if
rs.close
set rs=nothing
%></td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
...全文
21 点赞 收藏 回复
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复

还没有回复,快来抢沙发~

发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告