文章调用问题!

来源:百度知道 编辑:UC知道 时间:2024/06/28 16:35:45
这是我下的代码:
然后有这么一块:先是最新的十条新闻,但是太多了,我想显示3-5条,我应该改什么地方?
<%
While ((Repeat3__numRows <> 0) AND (NOT Recordset3.EOF))
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="xx">
<tr>
<td><p><A HREF="show.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & Recordset3.Fields.Item("id").Value %>" target="_blank"><img src="images/icon_public.gif" width="15" height="15" border="0"><%=(Recordset3.Fields.Item("title").Value)%></A></p></td>
</tr>
</table>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
Recordset3.MoveNext

不在这段里改,得改这段之前的SQL语句,这段要非改就只能

<%
do While ((Repeat3__numRows <> 0) AND (NOT Recordset3.EOF))
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="xx">
<tr>
<td><p><A HREF="show.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "id=" & Recordset3.Fields.Item("id").Value %>" target="_blank"><img src="images/icon_public.gif" width="15" height="15" border="0"><%=(Recordset3.Fields.Item("title").Value)%></A></p></td>
</tr>
</table>
<%
Repeat3__index=Repeat3__index+1
If Repeat3__index>3 then Exit Do
Repeat3__numRows=Repeat3__numRows-1
Recordset3.MoveNext()
Loop
%>