ASP制作网页重复区域横向换行显示代码
我设置了一个重复区域,但是都是纵向显示一条记录,我想把它变成横向显示三条记录后实现换行,百度看了人家的一些类似问题但是看不懂,希望大家帮我解决一下,本人菜鸟,可能给出的代...
我设置了一个重复区域,但是都是纵向显示一条记录,我想把它变成横向显示三条记录后实现换行,百度看了人家的一些类似问题但是看不懂,希望大家帮我解决一下,本人菜鸟,可能给出的代码我也不知道要加在哪里,所以希望说明清楚,谢谢!
<body>
<table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%=(Recordset1.Fields.Item("id").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("name").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("about").Value)%></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%></td>
</tr>
</table>
</body> 展开
<body>
<table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%=(Recordset1.Fields.Item("id").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("name").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("about").Value)%></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%></td>
</tr>
</table>
</body> 展开
展开全部
<body>
<table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
j=0
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
j=j+1
%>
<td>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%=(Recordset1.Fields.Item("id").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("name").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("about").Value)%></td>
</tr>
</table>
</td>
<% If (J Mod 3) = 0 Then
Response.Write "</td></tr>"
End If
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</tr>
</table>
</body>
<table width="690" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
j=0
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
j=j+1
%>
<td>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%=(Recordset1.Fields.Item("id").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("name").Value)%></td>
</tr>
<tr>
<td><%=(Recordset1.Fields.Item("about").Value)%></td>
</tr>
</table>
</td>
<% If (J Mod 3) = 0 Then
Response.Write "</td></tr>"
End If
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</tr>
</table>
</body>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询