ASP换行问题
<tdvalign="top"><!--公告lei=24--><%m=1Fori=1torsv.pagesize%><tablewidth="708"border="0"...
<td valign="top"><!--公告lei=24-->
<%
m=1
For i = 1 to rsv.pagesize%>
<table width="708" border="0" align="center" cellpadding="0" cellspacing="0" class="xw">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><img src="<%=rsv("news_pic")%>" width="150" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><%=rsv("newstitle")%></a></td>
</tr>
</table></td>
<%if m mod 4 = 0 then%>
</tr>
<tr>
<%end if
m=m+1
%>
</tr>
</table>
<%
rsv.MoveNext
Totalshow = Totalshow + 1
If rsv.Eof Then Exit For end if
Next
%>
<table width="100%" align="center" class="xw">
<% If Not rsv.recordcount<=rsv.pagesize Then %>
<form name="showfenye" id="showfenye">
<tr>
<td><table class="font" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" align="left" valign="bottom">页次:<b><%=page%></b>/<b><%=rsv.pagecount%></b>页 本页:<b><%=Totalshow%></b>条信息 共:<b><%=rsv.Recordcount%></b>条信息</td>
<td width="36%" align="left" valign="bottom">分页: <a href="?tp=<%=(page-1)%>" class="di">上一页</a> <a href="?tp=<%=(page+1)%>" class="di">下一页</a> </td>
</tr>
</table></td>
</tr>
</form>
<% End If %>
</table></td>
我想让一行显示四个,超过四个后自动换行,但是为什么不管用呢 展开
<%
m=1
For i = 1 to rsv.pagesize%>
<table width="708" border="0" align="center" cellpadding="0" cellspacing="0" class="xw">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><img src="<%=rsv("news_pic")%>" width="150" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><%=rsv("newstitle")%></a></td>
</tr>
</table></td>
<%if m mod 4 = 0 then%>
</tr>
<tr>
<%end if
m=m+1
%>
</tr>
</table>
<%
rsv.MoveNext
Totalshow = Totalshow + 1
If rsv.Eof Then Exit For end if
Next
%>
<table width="100%" align="center" class="xw">
<% If Not rsv.recordcount<=rsv.pagesize Then %>
<form name="showfenye" id="showfenye">
<tr>
<td><table class="font" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" align="left" valign="bottom">页次:<b><%=page%></b>/<b><%=rsv.pagecount%></b>页 本页:<b><%=Totalshow%></b>条信息 共:<b><%=rsv.Recordcount%></b>条信息</td>
<td width="36%" align="left" valign="bottom">分页: <a href="?tp=<%=(page-1)%>" class="di">上一页</a> <a href="?tp=<%=(page+1)%>" class="di">下一页</a> </td>
</tr>
</table></td>
</tr>
</form>
<% End If %>
</table></td>
我想让一行显示四个,超过四个后自动换行,但是为什么不管用呢 展开
1个回答
展开全部
正解来了,已测
<td valign="top"><!--公告lei=24-->
<table width="708" border="0" align="center" cellpadding="0" cellspacing="0" class="xw">
<tr>
<%
m=1
For i = 1 to rsv.pagesize
%>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><img src="<%=rsv("news_pic")%>" width="150" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><%=rsv("newstitle")%></a></td>
</tr>
</table>
</td>
<%
if m mod 4 = 0 then
%>
</tr>
<tr>
<%
end if
m=m+1
rsv.MoveNext
Totalshow = Totalshow + 1
If rsv.Eof Then Exit For end if
Next
%>
</tr>
</table>
<table width="100%" align="center" class="xw">
<% If Not rsv.recordcount<=rsv.pagesize Then %>
<form name="showfenye" id="showfenye">
<tr>
<td><table class="font" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" align="left" valign="bottom">页次:<b><%=page%></b>/<b><%=rsv.pagecount%></b>页 本页:<b><%=Totalshow%></b>条信息 共:<b><%=rsv.Recordcount%></b>条信息</td>
<td width="36%" align="left" valign="bottom">分页: <a href="" class="di">上一页</a> <a href="" class="di">下一页</a> </td>
</tr>
</table></td>
</tr>
</form>
<% End If %>
</table></td>
<td valign="top"><!--公告lei=24-->
<table width="708" border="0" align="center" cellpadding="0" cellspacing="0" class="xw">
<tr>
<%
m=1
For i = 1 to rsv.pagesize
%>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><img src="<%=rsv("news_pic")%>" width="150" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center"><a href="NewsShow.asp?newsID=<%=rsv("id")%>"><%=rsv("newstitle")%></a></td>
</tr>
</table>
</td>
<%
if m mod 4 = 0 then
%>
</tr>
<tr>
<%
end if
m=m+1
rsv.MoveNext
Totalshow = Totalshow + 1
If rsv.Eof Then Exit For end if
Next
%>
</tr>
</table>
<table width="100%" align="center" class="xw">
<% If Not rsv.recordcount<=rsv.pagesize Then %>
<form name="showfenye" id="showfenye">
<tr>
<td><table class="font" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="64%" align="left" valign="bottom">页次:<b><%=page%></b>/<b><%=rsv.pagecount%></b>页 本页:<b><%=Totalshow%></b>条信息 共:<b><%=rsv.Recordcount%></b>条信息</td>
<td width="36%" align="left" valign="bottom">分页: <a href="" class="di">上一页</a> <a href="" class="di">下一页</a> </td>
</tr>
</table></td>
</tr>
</form>
<% End If %>
</table></td>
参考资料: http://www.98710.com
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询