In many cases, we use the original method to solve the problem of looping 3 pictures in a row. If the uploader only uploads 2 pictures, the distance between the 2 pictures will be very large because a <td> </ td>. The following is the code. If you don’t understand it, I suggest you first clarify some of the table principles of <tr><td>, and then you’ll be good to go.
Copy the code code as follows:
<table border=0 cellpadding=0 cellspacing=0>
<%
dimrs,sqltext
set rs = Server.CreateObject(adodb.recordset)
sqltext=select * from [bigclass]
rs.Open sqltext,conn,1,1
m=1
colzs=5 'Display 5 columns in one row
if rs.RecordCount mod colzs=0 then
rowzs=int(rs.RecordCount/colzs)
else
rowzs=int(rs.RecordCount/colzs)+1
end if
for j = 1 to rowzs%>
<tr>
<%for i = 1 to colzs%>
<%if not rs.EOF then%>
<td><input type=checkbox name=qxflag<%=m%> value=1><%=trim(rs(bigname))%></td>
<%
rs.MoveNext
m = m + 1
else
%>
<td> </td>
<%end if%>
<%next%>
</tr>
<%
next
rs.Close
setrs=nothing
%>
</table>