ASP 循环两列两行 15
<tablewidth="98%"><tr><tdheight="19"colspan="2"></td></tr><tr><%i=0dowhilenotrs.eof%>...
<table width="98%">
<tr>
<td height="19" colspan="2"></td>
</tr>
<tr>
<%i=0
do while not rs.eof%>
<td width="52%" height="68"><table width="90%" style="BORDER-RIGHT:#C0C0C0 1px dashed; BORDER-TOP: #C0C0C0 1px dashed; BORDER-LEFT: #C0C0C0 1px dashed; BORDER-BOTTOM: #C0C0C0 1px dashed">
<tr>
<td width="33%" > <img src="<%=rs("img")%>" width="216" height="161" /></td>
<td width="67%" align="center" valign="top"><table width="100%">
<tr style="background-image:url('images/td.jpg');" onmouseover="this.style.backgroundImage='url(images/555.gif)'"
onmouseout="this.style.backgroundImage='url(images/td.jpg)'">
<td align="center"><font size="+2" face="黑体"><%=rs("title") %></font></td>
</tr>
<tr>
<td><%=rs("neirong") %></td>
</tr>
</table></td>
</tr>
</table></td>
<%rs.movenext
i=i+1
if i=2 then exit do
loop
%>
<td width="48%"> </td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
</table>
如何横向排列两个然后竖着往下排列? 展开
<tr>
<td height="19" colspan="2"></td>
</tr>
<tr>
<%i=0
do while not rs.eof%>
<td width="52%" height="68"><table width="90%" style="BORDER-RIGHT:#C0C0C0 1px dashed; BORDER-TOP: #C0C0C0 1px dashed; BORDER-LEFT: #C0C0C0 1px dashed; BORDER-BOTTOM: #C0C0C0 1px dashed">
<tr>
<td width="33%" > <img src="<%=rs("img")%>" width="216" height="161" /></td>
<td width="67%" align="center" valign="top"><table width="100%">
<tr style="background-image:url('images/td.jpg');" onmouseover="this.style.backgroundImage='url(images/555.gif)'"
onmouseout="this.style.backgroundImage='url(images/td.jpg)'">
<td align="center"><font size="+2" face="黑体"><%=rs("title") %></font></td>
</tr>
<tr>
<td><%=rs("neirong") %></td>
</tr>
</table></td>
</tr>
</table></td>
<%rs.movenext
i=i+1
if i=2 then exit do
loop
%>
<td width="48%"> </td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
<tr>
<td height="68"></td>
<td></td>
</tr>
</table>
如何横向排列两个然后竖着往下排列? 展开
1个回答
展开全部
是不是这个意思?
<table width="98%">
<tr>
<%i=1
do while not rs.eof
%>
<td><img src="<%=rs("img")%>" width="216" height="161" /></td>
<%if i mod 2=0 then%></tr><tr><%end if%>
<%
rs.movenext
i=i+1
loop
%>
</tr>
</table>
<table width="98%">
<tr>
<%i=1
do while not rs.eof
%>
<td><img src="<%=rs("img")%>" width="216" height="161" /></td>
<%if i mod 2=0 then%></tr><tr><%end if%>
<%
rs.movenext
i=i+1
loop
%>
</tr>
</table>
更多追问追答
追问
大哥表格旁边的东东呢?
追答
什么东东?我只是给你一个示例,具体的,你可以根据自己的需要调整啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询