多行多列代码问题,菜鸟问题...求解...

来源:百度知道 编辑:UC知道 时间:2024/09/23 06:05:09
要变成三行三列的显示,怎么处理?//

sub ShowProduct(TitleLen)
if TitleLen<0 or TitleLen>200 then
TitleLen=50
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
sqlProduct="select top " & MaxPerPage
else
sqlProduct="select "
end if

sqlProduct=sqlProduct & " ID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "
if BigClassName<>"" then
sqlProduct=sqlProduct & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then

以每行两列显示为例,访问的sql语句过程省略.

<%
dim i,j
i=1 '记录显示的个数
j=2 '设置每行显示的列数
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
do while not rs.eof
%>

<td>你的显示内容</td>

<%if i mod j=0 then 'i对j取余数为0的话就换行%>
</tr>
<tr>
<%end if%>
<%
i=i+1
rs.movenext
loop
%>
<%set rs=nothing
%>
</tr>
</table>