ASP分页这段代码怎么改?才能实现几行几列的表格输出?

来源:百度知道 编辑:UC知道 时间:2024/05/02 22:32:48
<table width="100%" height="92" border="0" align="center" cellpadding="10" cellspacing="0" class="gogo">
<tr bgcolor=#f9f9f9 onMouseOver=this.style.backgroundColor='#EDF6FF' onMouseOut=this.style.backgroundColor='#f9f9f9'><td width="17%" rowspan="3" class="table-you" align="center">
<a href=list.asp?id=<%=rs("bookid")%> >
<%if rs("bookpic")="" then
response.write "<div align=center><a href=list.asp?id="&rs("bookid")&" ><img src=images/emptybook.gif width=90 height=90 border=0></a></div>"
else%>
</a>
<TABLE onmouseover="this.style.backgroundColor='#FF4FAE'" onmouseout="this.style.backgroundColor=''" width=77 height=77 cellSpacing=1 cellPadding=2 bgColor=#e1e1

多行多列需要循环才行,下边给你了一个例子

For i=0 To Rs.Recordcount
If Rs.Eof Or Rs.Bof Then Exit For
Response.Write "<tr><td>a</td><td>b</td><td>c</td></tr>"
Rs.MoveNext
Next

没搞懂你想要的效果

由于你贴的代码不完整.我写个出来.
你自己配置运行下,看是不是你要的效果.
If ClassId = 0 Then
Sql = "Select id,title,p_img From Com_Product"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open Sql,Conn,1,1
Rs.PageSize = 4
I = 1
For II = 1 To Rs.PageSize * ( Page - 1 )
If Rs.Eof Then Exit For
Rs.MoveNext
Next
If Not Rs.Eof Then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%Do While Not Rs.Eof%>
<tr>
<td width="230" height="25" align="center">