请问这段代码修改哪里,让他调用竖排显示10条新闻,谢谢

来源:百度知道 编辑:UC知道 时间:2024/05/29 04:03:04
<%
set rst=server.createobject("adodb.recordset")
sql="select top 10 * from news order by hit desc"
rst.open sql,conn,1,1
if rst.eof and rst.bof then
response.write"该栏目还没有影片"
else
dim row_count66
row_count66=1
do while not rst.eof
%>

<td>
·<a href=<%=path%><%=hrefID(rst("ID"),rst("filename"))%> target="_blank" title='<%=title%>'><span class="style_14"><%=Left(Rst("Title"),12)%></span></a> <font color=999999> <%if trim(rst("pic"))<>"" then Response.Write "[图]"%></font>
</td>
<%if row_count66 mod 2 =0 then%>
</tr>
<%end if
row_count66=row_count66+1

<td>
·<a href=<%=path%><%=hrefID(rst("ID"),rst("filename"))%> target="_blank" title='<%=title%>'><span class="style_14"><%=Left(Rst("Title"),12)%></span></a> <font color=999999> <%if trim(rst("pic"))<>"" then Response.Write "[图]"%></font>
<br> "在这里加个换行符就行了,不要后面的</tr>"
</td>

如果按照你的语句
do while not rst.eof
%>

<td>
·<a href=<%=path%><%=hrefID(rst("ID"),rst("filename"))%> target="_blank" title='<%=title%>'><span class="style_14"><%=Left(Rst("Title"),12)%></span></a> <font color=999999> <%if trim(rst("pic"))<>"" then Response.Write "[图]"%></font>
</td>