日期:2014-05-17  浏览次数:21193 次

求自动换行代码!
我写了一段显示图片的代码,
想让它每显示两幅图片就自动换行,
请问怎么才能做到呢?
先谢谢了,
原来的代码是
<%SQL= "Select   *   from   NewsData   where   D_ClassID=1   order   by   D_ID   desc "
Set   rs=server.CreateObject( "ADODB.RecordSet ")
rs.Open   SQL,con,1,1
for   i=0   to   7
if   i> =rs.RecordCount   then
Exit   for
end   if
%>
<td   height= "780 "   >
<img   src= "eWebEditor/UploadFile/ <%=rs( "D_SaveFileName ")%> "   >
</td>
<%
rs.movenext
next
rs.Close
Set   rs=nothing
%>

------解决方案--------------------
<%SQL= "Select * from NewsData where D_ClassID=1 order by D_ID desc "
Set rs=server.CreateObject( "ADODB.RecordSet ")
rs.Open SQL,con,1,1
for i=0 to 7
if i> =rs.RecordCount then
Exit for
end if
%>
<td height= "780 " >
<img src= "eWebEditor/UploadFile/ <%=rs( "D_SaveFileName ")%> " >
<%
if i mod 2=1 then response.write( " <br /> ")
%>
</td>
<%
rs.movenext
next
rs.Close
Set rs=nothing
%>