请版主删帖。问题已经解决
我技术不好,做网站都是用的别人弄好的,现在要求将一个原本分两列显示的产品列表改成三列的,或者4列也行,但是我不会改,希望得到达人的帮助,我把原来的代码帖出来,帮我改动下,我直接帖上去用就好了。不胜感激。<%
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
%><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> <img src="images/ring01.gif" align="absmiddle"> <font color="#0099CC"><a href="class.asp?lx=big&anid=<%=rs("anclassid")%>"><font color="#0099CC"><u><%=rs("anclass")%></u></font></a></font></td>
</tr>
</table>
<table width=88% border="0" align="center" cellpadding="3" cellspacing="0">
<%
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from shop_nclass where anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
if rs_s.recordcount=0 then
%> <TR>
<td width="80%" height="30" align="center" colspan="0">暂无小分类</td>
<td width="80%" height="30" align="center" colspan="0"> </td>
</tr>
<%
else
i=0
while not rs_s.eof
%>
<tr>
<td><a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><u><%=rs_s("nclass")%></u></a>
<%rs_s.movenext
if rs_s.eof then
response.write "</td>"
else
%></td>
<td><a href="class.asp?lx=small&anid=<%=rs("anclassid")%>&nid=<%=rs_s("nclassid")%>"><u><%=rs_s("nclass")%></u></a> </td>
<%
rs_s.movenext
end if
response.write "</tr>"
wend
end if
%>
</table><%
rs_s.close
set rs_s=nothing
rs.movenext
wend
end if
rs.close
set rs=nothing
%>
[此贴子已经被作者于2007-4-30 22:17:41编辑过]