ASP怎么把重复区域显示横排和自动换行

以下是代码.麻烦看下要怎么修改才能横排显示和够了我指定的几录后自动换行<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="Connections/conn.asp" --><%Dim Rs_imgDim Rs_img_numRowsSet Rs_img = Server.CreateObject("ADODB.Recordset")Rs_img.ActiveConnection = MM_conn_STRINGRs_img.Source = "SELECT * FROM tu"Rs_img.CursorType = 0Rs_img.CursorLocation = 2Rs_img.LockType = 1Rs_img.Open()Rs_img_numRows = 0%><%Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = 6Repeat1__index = 0Rs_img_numRows = Rs_img_numRows + Repeat1__numRows%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=" http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><% While ((Repeat1__numRows <> 0) AND (NOT Rs_img.EOF)) %> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td><a href="<%=(Rs_img.Fields.Item("ID").Value)%>"><img src="img/<%=(Rs_img.Fields.Item("name").Value)%>" alt="" width="200" height="200" border="0" /></a></td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Rs_img.MoveNext()Wend%></td> </tr></table></body></html><%Rs_img.Close()Set Rs_img = Nothing%>
2026-11-17 17:40:42
推荐回答(2个)
回答1:

增加多一段代码就能实现: <%

num_tr=num_tr+1

if num_tr mod 4=0 then

response.write""

end if

%>