以下的代码应该是当内容在一排内到了两个就自动换行吧?
为什么我的第一排内老是有三个呢?
后面的都是两个一行!
<table border=1 cellpadding=2 width="100%">
<tr> <%
count=0
do while not (zhuinew.eof or zhuinew.bof) and count<zhuinew.PageSize
%> <td>
内容</td><%if count>=2 and count mod 2=0 then%> </tr><tr><%end if%>
<%zhuinew.movenext
count=count+1
loop
end if%>
<%zhuinew.close
set zhuinew=nothing
%> </tr> </table>
给个例子给你看(我刚才写的)
<table border="1"><tr>
<%
perpagesize=20 每页显示记录数
n=3 每行显示数据记录数
for i=1 to perpagesize
if (i mod n)<>0 then
response.write "<td>"&i&"</td>"
else
response.write "<td>"&i&"</td></tr>"
end if
next
%>
</table>
<table border=1 cellpadding=2 width="100%">
<tr> <%
count=0
while not (zhuinew.eof or zhuinew.bof) and count<zhuinew.PageSize
%> <td>
内容</td><%if count>=2 and count mod 2=0 then%> </tr><tr><%end if%>
<%
count=count+1
zhuinew.movenext
wend%>
<%zhuinew.close
set zhuinew=nothing
%> </tr> </table>
<%count=0%>
<table border=1 cellpadding=2 width="100%">
<%
while not (zhuinew.eof) and count<zhuinew.PageSize
if count mod 3=0 then response.write "<tr>"
%><td>内容</td>
<%
zhuinew.movenext
count=count+1
if count mod 3=0 then response.write "</tr>"
wend
zhuinew.close
set zhuinew=nothing
%>
</table>
我写了一个智能的n栏分的代码,上班给你发来