未来乐园小说:asp的产品显示中如何可以将产品并排着放(横向放)?

来源:百度文库 编辑:高考问答 时间:2024/05/03 06:06:38
http://www.sdxjpc.com/中的图书那样并排放?请高手赐教,急!急!急!急!急!急!急!急!急!
http://www.sdxjpc.com/iRelease/jsp/index.jsp的图书那样横着放?谢谢

<%
dim i
i = 1
While ((Repeat1__numRows <> 0) AND (NOT cp_show.EOF))
%>
<th scope="col"> <table width="139" border="0" cellspacing="1" cellpadding="1">
<tr>
<th scope="col"><a href="Product_look.asp?SysID=<%=(cp_show.Fields.Item("SysID").Value)%>"><img src="Picture/<%=(cp_show.Fields.Item("Cp_Pic").Value)%>" alt="" width="150" height="120" border="0" /></a></th>
</tr>
<tr>
<td align="center"><a href="Product_look.asp?SysID=<%=(cp_show.Fields.Item("SysID").Value)%>"><%=(cp_show.Fields.Item("Cp_name").Value)%></a></td>
</tr>
</table></th>
<%
if (i mod 1) = 0 then
response.Write("</tr>")
end if
i = i+1

Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
cp_show.MoveNext()
Wend
%>

设一个变量为i,用来判断是否分行,比如你要4个一行 就 if 记录数 Mod i =0 then "换行符,可能是<br>",这样作。
实际情况是如果用表格拍板,你要用</tr>来换行。

不是很理解...用表格或层.都可以啊..