关于 asp 商品分类 排版

来源:百度知道 编辑:UC知道 时间:2024/06/17 15:38:07
<table width="93%" border="0" align="center" cellSpacing="0">
<tr>
<td height="23">
<%

'二次查询大类
set rs=server.CreateObject("adodb.recordset")
rs.open "select anclass,anclassid,sztys from shop_anclass",conn,1,1
do while not rs.eof
response.write "<IMG height=9 src=images/Forum_nav.gif width=9 border=0>  <A href=class.asp?lx=big&anid="&rs("anclassid")&" class=top><font color="&trim(rs("sztys"))&"><b>"&trim(rs("anclass"))&"</b></font></a>  <br>"
'//查询小类

set rs2=server.CreateObject("adodb.recordset")
rs2.open "select nclass,nclassid,xsztys from shop_nclass where anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
do while not rs2.

'具体的你可以根据自己的定义去更改
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="6"></td>
</tr>
<tr>
<td height="20">
<div align="center"><%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs.recordcount=0 then
response.write "<br>目前没有商品分类"
else
while not rs.eof
%>
</div>
<table width=100% cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan=2 height="22"><font color="#FF6600"> <a href="class.asp?lx=big&anid=<%=