标题:[求助]图片怎么样才能让他横的排列 4个.然后自动换行..!!
只看楼主
xiaobo2008
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-4-19
 问题点数:0 回复次数:1 
[求助]图片怎么样才能让他横的排列 4个.然后自动换行..!!
<% sql="select top 8 title,adid,color,pic,type_two,type_three from china_data where pic <>'' and stop >= date() order by adid desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if rs.eof then %>
暂无工作犬信息!
<% rs.close
set rs=nothing
else
i=0
do while i<16 and not rs.eof %>
<td><div align="center"><img class="image_kuang" src="<% if lcase(left(rs("pic"),7))<>"http://" then%>adpic/<%end if%><%=rs("pic")%>"width="74" height="51" alt="<%=rs("title")%>" > <a title=<%=rs("title")%> href="html/<%=rs("adid")%>.htm" target="_blank"><font style="size:12px" <%if rs("color")<>"" then%>color="<%=rs("color")%>">
<%end if%>>
<%=left(rs("type_three"),4)%>&nbsp;<%=left(rs("type_two"),5)%></a>
</div>
<%i=i+4
rs.movenext
loop
rs.close
set rs=nothing
end if %>

[求助]图片怎么样才能让他横的排列 4个.然后自动换行..!!

搜索更多相关主题的帖子: 排列 pic eof 自动 
2007-04-21 19:57
lq7350684
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:5089
专家分:98
注 册:2006-11-6
得分:0 
<% sql="select top 8 title,adid,color,pic,type_two,type_three from china_data where pic <>'' and stop >= date() order by adid desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if rs.eof then %>
暂无工作犬信息!
<% rs.close
set rs=nothing
else
dim i
do while i<16 and not rs.eof
i=i+1
%>
<td><div align="center"><img class="image_kuang" src="<% if lcase(left(rs("pic"),7))<>"http://" then%>adpic/<%end if%><%=rs("pic")%>"width="74" height="51" alt="<%=rs("title")%>" > <a title=<%=rs("title")%> href="html/<%=rs("adid")%>.htm" target="_blank"><font style="size:12px" <%if rs("color")<>"" then%>color="<%=rs("color")%>">
<%end if%>>
<%=left(rs("type_three"),4)%>&nbsp;<%=left(rs("type_two"),5)%></a>
</div>
<%if i mod 4=0 then response.white "<br>"
rs.movenext
loop
rs.close
set rs=nothing
end if %>
2007-04-22 11:41



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-133842-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.016629 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved