Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp技巧

本人常用的分页代码

来源:中文源码网    浏览:148 次    日期:2024-05-03 18:40:18
【下载文档:  本人常用的分页代码.txt 】


本人常用的分页代码
个人会员管理
.closes
{
font-size:9pt;
color:#333333;
background-color:#f7f7f7;
border:1px solid #CCCCCC;}
function selectall() {
for (var z=0;z<=document.formselect.memberid.length;z++) {
var e=document.formselect.memberid[z];
e.checked=!e.checked;
}
}
function delmember(id)
{
if (confirm('你确定要删除此条信息吗?')){
window.open("gr_delselect.asp?id="+id,"","width=150,height=20,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no");}}
function killerror(){
return true;
}
window.onerror=killerror;
个人会员列表
序号
用户名
加入日期
等级
操作
<%
dim maxperpage
maxperpage=20
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
filename="gr_member.asp"
dim rs
set rs=server.CreateObject("adodb.recordset")
sql="select id,dxy_username,datetime,dj from "&gr_membertable&" order by id desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "没有相关信息"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*maxperpage>totalput then
if (totalput mod maxperpage)=0 then
currentpage=totalput\maxperpage
else
currentpage=totalput\maxperpage+1
end if
end if
if currentpage=1 then
showcontent()
showpage totalput,maxperpage,filename
else
if (currentpage-1)*maxperpagers.move (currentpage-1)*maxperpage
dim bookmark
bookmark=rs.bookmark
showcontent
showpage totalput,maxperpage,filename
else
currentpage=1
showcontent
showpage totalput,maxperpage,filename
end if
end if
end if
sub showcontent()
i=1
do while not rs.eof
%>
">
">修改 )">删除
<%
rs.movenext
i=i+1
if rs.eof then exit do
if i>maxperpage then exit do
loop
end sub
%>
<%
function showpage(totalnumber,maxperpage,filename)
%>
<%
dim n
if totalnumber mod maxperpage=0 then
n=totalnumber\maxperpage
else
n=totalnumber\maxperpage+1
end if
%>
共有/条,
当前页/
[首页] [上一页]
">[首页] &page=">[上一页]
[下一页] [尾页]&page=">[下一页]
&page=">[尾页]
转到: