ASP重复表格

来源:百度知道 编辑:UC知道 时间:2024/06/04 04:19:12
<table border=0 cellspacing=0 cellpadding=0 width='96%'>
<%
dim word
sql="select top 2 id,topic,word,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
word=rs("word")
response.write " <tr><td style='line-height:150%'><a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>       "&joekoe_cms.code_html(word,1,112)&"</a></td></tr>"
rs.movenext
loop
rs.close
%>
</table>

怎么让他读取的下一个数据自动换行按同样表格显示

在单元格内换行,加个<br>行吗?
<table border=0 cellspacing=0 cellpadding=0 width='96%'>
<tr>
<%
dim word
sql="select top 2 id,topic,word,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
word=rs("word")
response.write "td style='line-height:150%'><a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'> "&joekoe_cms.code_html(word,1,112)&"</a><br></td>"
rs.movenext
loop
rs.close
%>
</tr>
</table>
---------重复表格显示:-------------
<%
dim word
sql="select top 2 id,topic,word,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)