zoukankan
html css js c++ java
多行多列的分页,与之前发的不同.
<
!
--
#include file
=
"
inc/conn.asp
"
-->
<
%
dim
i,intPage,page,pre,last,filepath
set
rs
=
server.CreateObject(
"
adodb.recordset
"
)
sql
=
"
select * from product
"
rs.PageSize
=
12
rs.CursorLocation
=
3
rs.Open sql,conn,
0
,
2
,
1
pre
=
true
last
=
true
page
=
trim
(Request.QueryString(
"
page
"
))
if
len
(page)
=
0
then
intpage
=
1
pre
=
false
else
if
cint
(page)
=<
1
then
intpage
=
1
pre
=
false
else
if
cint
(page)
>=
rs.PageCount
then
intpage
=
rs.PageCount
last
=
false
else
intpage
=
cint
(page)
end
if
end
if
end
if
if
not
rs.eof
then
rs.AbsolutePage
=
intpage
end
if
%
>
<
!
--
循环开始
-->
<
table
>
<
%
'
行循环判断 to后面是行数
for
i
=
1
to
3
%
>
<
tr
>
<
%
'
列循环判断 to后面是列数
for
j
=
1
to
4
if
not
rs.eof
then
%
>
<
td
>
显示内空
</
td
>
<
%
rs.movenext
else
%
>
<
td
>
</
td
>
<
%
end
if
next
%
>
</
tr
>
<
%
next
%
>
</
table
>
<
!
--
循环体结束
分页部分:
-->
<
table width
=
"
99%
"
border
=
"
1
"
cellpadding
=
"
2
"
cellspacing
=
"
2
"
borderColorLight
=
#
808080
borderColorDark
=
#ffffff
>
<
tr
>
<
Td width
=
"
10%
"
>
共有
<
%
=
rs.recordcount%
>
条记录
</
Td
>
<
%
if
rs.pagecount
>
0
then
%
>
<
td width
=
"
13%
"
align
=
"
left
"
>
当前页
<
%
=
intpage%
>/<
%
=
rs.PageCount%
></
td
>
<
%
else
%
>
<
td width
=
"
41%
"
align
=
"
left
"
>
当前页0
/
0
</
td
><
%
end
if
%
>
<
td width
=
"
46%
"
align
=
"
right
"
>
<
a href
=
"
?page=1
"
>
首页
</
a
>
|
<
%
if
pre
then
%
>
<
%
if
rs.pagecount
=
1
then
'
判断是否显示上页、下页
Response.Write
""
else
%
>
<
a href
=
"
?page=<%=intpage -1%>
"
>
上页
</
a
>
|
<
%
end
if
%
>
<
%
if
last
then
%
>
<
a href
=
"
?page=<%=intpage +1%>
"
>
下页
</
a
>
|
<
%
end
if
end
if
%
>
<
a href
=
"
?page=<%=rs.PageCount%>
"
>
尾页
</
a
>
|转到第
<
select
name
=
"
sel_page
"
>
<
%
for
i
=
1
to
rs.PageCount
if
i
=
intpage
then
%
>
<
option
value
=
"
?page=<%=i%>
"
selected
><
%
=
i%
></
option
>
<
%
else
%
>
<
option
value
=
"
?page=<%=i%>
"
><
%
=
i%
></
option
>
<
%
end
if
next
%
>
</
select
>
页
</
font
>
</
td
>
</
tr
>
</
table
>
查看全文
相关阅读:
HashMap遍历和使用
java的环境变量classpath中加点号 ‘.’ 的作用
java编程思想-第六章-某些练习题
内连接查询 (select * from a join b on a.id = b.id) 与 关联查询 (select * from a , b where a.id = b.id)的区别
django入门-模型-part2
django入门-初窥门径-part1
jdk8飞行记录器配置
docker-compose启动的tomcat无法远程连接jmx
zabbix_sender自定义监控
搭建基于Jenkins salt-api的运维工具
原文地址:https://www.cnblogs.com/zerogo/p/2209374.html
最新文章
Django使用步骤
Python 爬取12306火车票
Python 爬取拉钩网工作岗位
Python 列表,元组,字典
Dell服务器配置RAID1+RAID0磁盘阵列
华为服务器设置iBMC管理网口IP地址,开启Monitor图文教程
Linux操作系统之Shell程序设计
Dell服务器通过IDRAC9收集TSR日志排查故障
在 CentOS 或 RHEL 系统上检查可用的安全更新的方法
介绍两种在RHEL 和 CentOS 系统上检查或列出已安装的安全更新的方法
热门文章
在 CentOS 或 RHEL 系统上检查可用的安全更新的方法
在 Linux 下确认 NTP 是否同步的方法
你需要知道的 5 个 Linux 新手会犯的失误
网络安全整改小技巧
java判断一个字符串是否是数字的三种方法
IDEA 格式化代码快捷键冲突解决
使用intelliJ创建 spring boot + gradle + mybatis站点
MySQL使用一张表的字段更新另一张表的字段
java 中 一个int类型的num,num&1
Java中重载和重写的区别
Copyright © 2011-2022 走看看