我想搞一个三级的菜单用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>
...全文
46 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧