asp对记录集的横排

来源:互联网 发布:config.inc.php出错 编辑:程序博客网 时间:2024/04/29 12:26

<table width="100%" align="center">
<%
'for i=1 to rs.pagesize   '变量i从1循环到当前页中的全部记录数
for i=1 to 10
'If rs.eof Then
'Exit For
'End if
     if (i mod 3 =1) then  '每个tr显示3个记录,可根据需要自行修改
         response.write "<tr>"
     end if
         response.write "<td>名称:"&i&"</td>"
    if (i mod 3 = 0) then
         response.write "</tr>"
    end if
'rs.movenext
Next
%>
</table> 

原创粉丝点击