ASP两列四行显示代码??
我想把以下代码变成两列四行显示,如何能实现。。高手帮忙<tablewidth="240"height="26"border=0align="center"cellpadd...
我想把以下代码变成两列四行显示,如何能实现。。高手帮忙
<table width="240" height="26"
border=0 align="center" cellpadding=0 cellspacing=0>
<tbody>
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select top 6 * from icif where sort='颜氏文化' order by id desc"
rs1.open sql1,conn,1,1
if not rs1.eof then
while not rs1.eof
%>
<tr>
<td width="9%" height="36"><div align="center"><img src="js/sjb.jpg" width="10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</a></td>
</tr>
<%
rs1.movenext
wend
end if
rs1.close
set rs1=nothing
%>
</tbody>
</table> 展开
<table width="240" height="26"
border=0 align="center" cellpadding=0 cellspacing=0>
<tbody>
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select top 6 * from icif where sort='颜氏文化' order by id desc"
rs1.open sql1,conn,1,1
if not rs1.eof then
while not rs1.eof
%>
<tr>
<td width="9%" height="36"><div align="center"><img src="js/sjb.jpg" width="10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</a></td>
</tr>
<%
rs1.movenext
wend
end if
rs1.close
set rs1=nothing
%>
</tbody>
</table> 展开
3个回答
展开全部
top 6
改成 Top 8
%>
<tr>
<td width="9%" height="36"><div align="center">亩液<img src="js/sjb.jpg" width="10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</a></td>
</tr>
<%
改为
i=i+1
IF i Mod 2=1 Then
Response.write"<tr>"
End IF
%>
<td width="9%" height="36"><div align="center"><img src="js/sjb.jpg" width="迅穗10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</亩耐卜a></td>
<% IF i Mod 2=1 Then
Response.write"</tr> "
End IF
改成 Top 8
%>
<tr>
<td width="9%" height="36"><div align="center">亩液<img src="js/sjb.jpg" width="10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</a></td>
</tr>
<%
改为
i=i+1
IF i Mod 2=1 Then
Response.write"<tr>"
End IF
%>
<td width="9%" height="36"><div align="center"><img src="js/sjb.jpg" width="迅穗10" height="8"></div></td>
<td colspan="2" class=9blue18><a href="wenhua.asp?id=<%=rs1("id")%>" target="_blank"><%=left(rs1("bt"),18)%>
<%if len(rs1("bt"))>18 then response.write "..."%>
</亩耐卜a></td>
<% IF i Mod 2=1 Then
Response.write"</tr> "
End IF
展开全部
top
6
改成
Top
8
%>
<tr>
<td
width="9%"
height="36"><div
align="center"><img
src="js/sjb.jpg"
width="10"
height="拿旦8"></div></td>
<祥猛td
colspan="2"
class=9blue18><a
href="wenhua.asp?id=<%=rs1("id")%>"
target="_blank"><%=left(rs1("bt"),18)%>
<%if
len(rs1("bt"))>18
then
response.write
"..."%>
</a></td>
</tr>
<%
改为
i=i+1
IF
i
Mod
2=1
Then
Response.write"<tr>"
End
IF
%>
<td
width="9%"
height="36"><div
align="center"><img
src="js/sjb.jpg"
width="10"
height="8"><谨敏桥/div></td>
<td
colspan="2"
class=9blue18><a
href="wenhua.asp?id=<%=rs1("id")%>"
target="_blank"><%=left(rs1("bt"),18)%>
<%if
len(rs1("bt"))>18
then
response.write
"..."%>
</a></td>
<%
IF
i
Mod
2=1
Then
Response.write"</tr>
"
End
IF
6
改成
Top
8
%>
<tr>
<td
width="9%"
height="36"><div
align="center"><img
src="js/sjb.jpg"
width="10"
height="拿旦8"></div></td>
<祥猛td
colspan="2"
class=9blue18><a
href="wenhua.asp?id=<%=rs1("id")%>"
target="_blank"><%=left(rs1("bt"),18)%>
<%if
len(rs1("bt"))>18
then
response.write
"..."%>
</a></td>
</tr>
<%
改为
i=i+1
IF
i
Mod
2=1
Then
Response.write"<tr>"
End
IF
%>
<td
width="9%"
height="36"><div
align="center"><img
src="js/sjb.jpg"
width="10"
height="8"><谨敏桥/div></td>
<td
colspan="2"
class=9blue18><a
href="wenhua.asp?id=<%=rs1("id")%>"
target="_blank"><%=left(rs1("bt"),18)%>
<%if
len(rs1("bt"))>18
then
response.write
"..."%>
</a></td>
<%
IF
i
Mod
2=1
Then
Response.write"</tr>
"
End
IF
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
去掉colspan="2"就可以两列显示了.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询