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
>
查看全文
相关阅读:
Android 查看APK文件的签名算法
Android 查看App冷启动时间/热启动时间/页面打开时间
Android 查看Apk签名方式V1和V2
Android App启动速度优化
Android SharedPreferences中apply和commit的效率差距
Gralde 网络代理
Git 将子文件夹分离为一个新的库
Fabric-Crashlytics-Android 注意点
Gradle编译失败 generating the main dex list
Gralde 同步失败
原文地址:https://www.cnblogs.com/zerogo/p/2209374.html
最新文章
java8新特性详解(转)
【转】前端性能优化方案
[转]JS移动端浏览器取消右划后退的几种方法
在视频对象间使用转场gl-transition之regl-transition 使用
视频测试URL地址
[转]git clone 报错 “Clone failed: Authentication failed for xxxxx”
[转]RTMP、HTTP-FLV、HLS,你了解常见的三大直播协议吗
【转】css隐藏滚动条
[转]给console.log加点样式
零散记录
热门文章
CSS响应式布局
JS中的常用的代码操作
使用vscode快速建立vue模板
节流和防抖的区别,以及如何实现
Vue插槽详解
Vue 自定义组件
zoom:1的常见作用
VsCode中使用Emmet神器快速编写HTML代码
HTML-meta标签详解
JS-七大查找算法
Copyright © 2011-2022 走看看