嵌套循环td时补齐td的解决方法

<table border="0" align="center" cellpadding="3" cellspacing="1" class="body">
<tr>
<td colspan="6" class="title">管理图片</td>
</tr>
<%
Dim l,c
If Not Rs.Eof Then
Rs.Pagesize
= 24
Ipage
= Request("page")
If Cint(Request("page")) <= 0 Then Ipage = 1
If Cint(Request("page")) > Rs.PageCount Then Ipage = Rs.PageCount
Rs.AbsolutePage
= Ipage
For l = 1 To 4
If Rs.Eof Then Exit For
%>
<tr>
<%
For c = 1 To 6
If Rs.Eof And Rs.RecordCount Mod 6 <> 0 Then
For i = 1 To 6 - Rs.RecordCount Mod 6
Response.Write(
"<td class=""tdbg"">&nbsp;</td>")
Next
Exit For
End If
%>
<td align="center" class="tdbg">
<img src="<%=SiteDir & Rs("PicUrl")%>" width="145" height="97" style="border:1px solid #CCCCCC;">
<div><a href="?Action=EditPic&PicID=<%=Rs("PicID")%>">编辑</a>&nbsp;&nbsp;&nbsp;<a href="?Action=DelPic&PicID=<%=Rs("PicID")%>">删除</a></div>
</td>
<%Rs.MoveNext%>
<%Next%>
</tr>
<%Next%>
<%End If%>
<tr>
<td colspan="6" align="center" class="tdbg"><%=FerPage(0,0,"ClassID="&ClassID&"&",Rs.RecordCount,Rs.PageCount,Rs.PageSize,Ipage)%></td>
</tr>
</table>

posted on 2011-03-24 19:21  静以修身俭以养德  阅读(532)  评论(0编辑  收藏  举报

导航