asp代码编程语言
<tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><%setrsguest=server.Cr...
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
set rsguest=server.CreateObject("adodb.recordset")
sql="select top 6 * from loupan order by datt desc"
rsguest.open sql,conn,1,1
i=1
do while not rsguest.eof
if i mod 2 = 1 then
response.write "<tr>"
end if
%>
<td width="33%" height="22"><a href='/news/news_show.asp?id=<%=rsguest("id")%>' target=_blank><%=rsguest("tele")%></a></td>
<%
if i mod 2 =0 then '每行3列
response.write "</tr>"
response.write" <tr><td height='1' colspan='2' background='images_01/right/guest_line.gif'></td></tr>"
end if
rsguest.movenext
i = i + 1
if i = 3 then i = 1
loop
rsguest.close
set rsguest=nothing
%>
</tr>
</table> 怎么改变成横向重复2行3列啊 展开
<tr>
<%
set rsguest=server.CreateObject("adodb.recordset")
sql="select top 6 * from loupan order by datt desc"
rsguest.open sql,conn,1,1
i=1
do while not rsguest.eof
if i mod 2 = 1 then
response.write "<tr>"
end if
%>
<td width="33%" height="22"><a href='/news/news_show.asp?id=<%=rsguest("id")%>' target=_blank><%=rsguest("tele")%></a></td>
<%
if i mod 2 =0 then '每行3列
response.write "</tr>"
response.write" <tr><td height='1' colspan='2' background='images_01/right/guest_line.gif'></td></tr>"
end if
rsguest.movenext
i = i + 1
if i = 3 then i = 1
loop
rsguest.close
set rsguest=nothing
%>
</tr>
</table> 怎么改变成横向重复2行3列啊 展开
1个回答
展开全部
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
set rsguest=server.CreateObject("adodb.recordset")
sql="select top 6 * from loupan order by datt desc"
rsguest.open sql,conn,1,1
i=1
do while not rsguest.eof
%>
<td width="33%" height="22"><a href='/news/news_show.asp?id=<%=rsguest("id")%>' target=_blank><%=rsguest("tele")%></a></td>
<%
if i mod 3 = 0 then
response.write "</tr><tr>"
end if
i = i + 1
rsguest.movenext
loop
rsguest.close
set rsguest=nothing
%>
</tr>
</table>
<tr>
<%
set rsguest=server.CreateObject("adodb.recordset")
sql="select top 6 * from loupan order by datt desc"
rsguest.open sql,conn,1,1
i=1
do while not rsguest.eof
%>
<td width="33%" height="22"><a href='/news/news_show.asp?id=<%=rsguest("id")%>' target=_blank><%=rsguest("tele")%></a></td>
<%
if i mod 3 = 0 then
response.write "</tr><tr>"
end if
i = i + 1
rsguest.movenext
loop
rsguest.close
set rsguest=nothing
%>
</tr>
</table>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询