asp 产品展示

来源:百度知道 编辑:UC知道 时间:2024/06/09 12:55:59
<%set rs=server.createobject("adodb.recordset")
sql="select * from huibiaosheji "
rs.open sql,conn,3
%>
<%if rs.recordcount=0 then%>
<tr>
<td>暂时没有信息</td>
</tr>
<%else%>

<table width="688" border="0">
<%for j=1 to 5 %>
<tr align="center">

<%for i=1 to 4%>

<td><% if rs.eof then exit for %><img src="ewebeditor/UploadFile/<%=rs("images")%>.jpg" height="30px" width="30px"></td>

<%
rs.movenext()
next
%>

</tr>

<% if rs.eof then exit for
rs.movenext()
next
%>

<%end if%>

这是产品展示页面,我想每行显示4张图,一共显示5行,但是运行程序后,每到第五条就不显示,直接显示第六条,求救,请大家帮我改一下,谢谢。

<%
set rs=server.createobject("adodb.recordset")
sql="select * from huibiaosheji "
rs.open sql,conn,1,1
%>
<%if rs.eof then%>
<tr>
<td>暂时没有信息</td>
</tr>
<%else%>

<table width="688" border="0"><tr align="center">

<%for ii=0 to rs.recordcount-1%>
<% if ii>0 and ii mod 4=0 then %>
</tr><tr>
<%end if%>
<td><% if rs.eof then exit for %><img src="ewebeditor/UploadFile/<%=rs("images")%>.jpg" height="30px" width="30px"></td>
<%
rs.movenext
next%>
</tr>
</table>
<%end if %>