如何实现平行输出两条记录?
<tr>
<td height= "22 " align= "left "> <img src= "../../image/home2_003.gif " border= "0 " /> <a href= "# "> <span class= "style11 "> <%=listtitle%> </span> </a> </td> <td height= "22 " align= "left "> <img src= "../../image/home2_003.gif " border= "0 " /> <a href= " "> <span class= "style11 "> <%=listtitle%> </span> </a> </td>
</tr>
这个表是一行两列,怎么才可以实现一行两列记录呢?
如:
记录A 记录B
记录C 记录D
记录E 记录F
...
共10条记录5行显示?
------解决方案-------------------- <table>
<tr>
<td> A </td>
<td> B </td>
</tr>
<tr>
<td> C </td>
<td> D </td>
</tr>
<tr>
<td> E </td>
<td> F </td>
</tr>
</table>
------解决方案-------------------- <table>
<tr>
<%for i = 1 to 10%>
<td> 内容 </td>
<%if i mod 2 = 0 then response.write " </tr> <tr> "
next%>
</tr>
</table>
------解决方案--------------------楼主该不是在问HTML问题吧~~~
------解决方案-------------------- <%do while not rs.eof%>
<tr>
<td height= "22 " align= "left "> <img src= "../../image/home2_003.gif " border= "0 " /> <a href= "# "> <span class= "style11 "> <%=listtitle%> </span> </a>
</td>
<%
rs.movenext
if not rs.eof then
%>
<td height= "22 " align= "left "> <img src= "../../image/home2_003.gif " border= "0 " /> <a href= " "> <span class= "style11 "> <%=listtitle%> </span> </a>
</td>
<%end if%>
</tr>
<%
rs.movenext
loop
%>
------解决方案-------------------- <table border=1 width=50> <%
str=array( "A ", "B ", "C ", "D ", "E ", "F ", "G ", "H ", "I ", "J ")
for i = 0 to ubound(str) step 2%>
<tr>
<td> <%=str(i)%> </td> <td> <%=str(i+1)%> </td>
</tr>
<%next%>
</table>
------解决方案-------------------- <table>
<% do while not rs.eof %>
<tr>
<td> <%=rs( "listtitle ")%> </td>
<%
rs.movenext
if not rs.eof then %>
<td> <%=rs( "listtitle ")%> </td>
<% rs.movenext
else %>
<td> </td>
<% end if %>
</tr>
<% loop %>
</table>