网页同行显示5张图片自动换行

来源:百度知道 编辑:UC知道 时间:2024/09/28 08:53:45
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<%
page=request("page")
if page="" then
nowpage=1
else
if (not isnumeric(page)) or instr(page,".")>0 then
response.redirect "tip.asp?tipstr=参数不合法,请返回"
response.end
end if
nowpage=clng(page)
end if
sql="select a.ID,a.Name,a.Price1,a.Price2,(select top 1 Path from YZ_Consume_GoodsImage where GID= a.ID AND SortID=1) AS Path from YZ_Consume_GoodsInfo a where IsShow=1"
if gkey<>"" then
gkey=strtosearch(gkey)
sql=sql&" and Name like '"&gkey&"'"
end if
if sprice<>"" then
sql=sql&" and Price2>="&sprice

<table>
do wile not rs.eof
<tr>
for i=1 to5
<td>你的图片</td>
rs.movenext
next
</tr>
toop
</table>
这个给你参考吧,这样就是五列多行,可能单词会写错了自己看ASP语法你自己明白

用一个do向下打出行来,再用一个for打出左右行来就是这个意思了