关于分页!帮忙啊!大虾!

阿土sap 2003-08-20 09:08:01
做成一排显示两个产品样式!
再用上分页!
有人可以帮我吗!
...全文
26 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ahuiok 2003-08-20
  • 打赏
  • 举报
回复
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="black">
<tr>
<td colspan="4" bgcolor="#3399CC" class="white" >
<%
set rs=server.createobject("adodb.recordset")
sql="select * from class1 order by dateandtime asc "
rs.open sql,conn,3,3
if rs.bof or rs.eof then
response.write "此 分 类 下 暂 无 信 息"
response.end
end if

%>
</td>
</tr>
<%c=0
do while c < rs.recordcount and not rs.eof %>
<tr>
<td width="50%" valign="top">

<%=rs(id)%>
<%c=c+1
rs.movenext
end if
%>
</td>
<td width="50%" valign="top">
<%
rs1.close
set rs1=nothing
%>
</td>
</tr>
</table>

<%=rs("id")%>
<%c=c+1
rs.movenext
end if
%>
</td>

</tr><%
loop
rs.close
set rs=nothing %>

</table>
chinahuman 2003-08-20
  • 打赏
  • 举报
回复
利用表格,当记数值是2的倍数的时候,就产生一个换行(用</tr><tr>来实现)这样就可以一排排两个了,如果要一排排三个,就要用计数值来除3了,其它的就以止类推了
chinahuman 2003-08-20
  • 打赏
  • 举报
回复
取出数据后,用rs
count=0
response.write "<table><tr>"
do while not rs.eof and count<rs.pagesize
if count<>0 and count mod 2=0 then response.write "</tr><tr>"
response.write "<td>"
'你要输出的数据
response.write "</td>"
rs.movenext
count=count+1
loop
response.write "</tr></table>"

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧