Toggle navigation
首页
热门资讯
资源下载
技术博客
会员
中心
会员中心
发布博文
发布资源
首页
文章中心
ASP编程
本人常用的分页代码
192 阅读
0 评论
127 点赞
我是
靠谱客
的博主
仁爱乐曲
,这篇文章主要介绍
本人常用的分页代码
,现在分享给大家,希望可以做个参考。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>个人会员管理</title> <link href="main.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .closes { font-size:9pt; color:#333333; background-color:#f7f7f7; border:1px solid #CCCCCC;} </style> </head> <body> <table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" style="border:1px solid #799AE1"> <tr> <td height="25" colspan="5" bgcolor="#799AE1" style="text-indent:2em;" class="blueback">个人会员列表</td> </tr> <tr> <td width="36" height="25" bgcolor="#ADBEEF"><div align="center">序号</div></td> <td width="244" bgcolor="#ADBEEF"><div align="center">用户名</div></td> <td width="140" bgcolor="#ADBEEF"><div align="center">加入日期</div></td> <td width="140" bgcolor="#ADBEEF"><div align="center">等级</div></td> <td width="140" bgcolor="#ADBEEF"><div align="center">操作</div></td> </tr> <form action="gr_delselect.asp" method="post" name="formselect"> <% 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)*maxperpage<totalput then rs.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 %> <tr> <td height="25" bgcolor="#D6DFF7"><div align="center"> <input type="checkbox" name="memberid" value="<%=rs("id")%>"> </div></td> <td bgcolor="#D6DFF7"><div align="center"><%=rs("dxy_username")%></div></td> <td bgcolor="#D6DFF7"><div align="center"><%=rs("datetime")%></div></td> <td bgcolor="#D6DFF7"><div align="center"><%=rs("dj")%></div></td> <td bgcolor="#D6DFF7"><div align="center">">修改 )">删除</div></td> </tr> <% rs.movenext i=i+1 if rs.eof then exit do if i>maxperpage then exit do loop end sub %> <tr> <td height="25" colspan="5" bgcolor="#D6DFF7"><div align="center"> <input name="Submit" type="button" class="closes" value="全选" onClick="javascript:selectall()"> <input name="Submit2" type="submit" class="closes" value="删除"> </div></td> </tr> </form> <% function showpage(totalnumber,maxperpage,filename) %> <tr> <td height="30" colspan="5" align="center" bgcolor="#D6DFF7"> <% dim n if totalnumber mod maxperpage=0 then n=totalnumber\maxperpage else n=totalnumber\maxperpage+1 end if %> 共有<%=totalnumber%>/<%=maxperpage%>条, 当前页<%=currentpage%>/<%=n%> <%if currentpage<2 then%> [首页] [上一页] <%else%> "><font color="red">[首页]</font> &page=<%=currentpage-1%>"><font color="red">[上一页]</font> <%end if%><% if n-currentpage<1 then%> [下一页] [尾页]<%else%>&page=<%=currentpage+1%>"><font color="red">[下一页] </font> &page=<%=n%>"><font color="red">[尾页]</font> <%end if%> 转到:<select name="dd" class="sle" onChange="location.href=this.options[this.selectedIndex].value"> <%for j=1 to n if currentpage=j then %><option value="<%=filename%>&page=<%=j%>" selected><%=j%></option> <% else %> <option value="<%=filename%>&page=<%=j%>"><%=j%></option> <% end if next %> </select></td></tr> <% end function %> </table> <table width="700" height="28" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> </table> </body> </html>
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
最后
以上就是
仁爱乐曲
最近收集整理的关于
本人常用的分页代码
的全部内容,更多相关
本人常用
内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(
127
)
本文分类:
ASP编程
浏览次数:
192
次浏览
发布日期:2022-04-11 18:14:02
本文链接:
https://www.kaopuke.com/article/k-p-k_14_u_7_o_6_fx_12__23__10_y.html
相关文章
linux下非阻塞模式网络通讯模型示例分享
Photoshop调出欧美人像模特金属质感的完美肤色效果
如何更改win7双系统开机系统选择时间 加快开机呢?
Photoshop仿黑白照片上色简明教程
本人常用的分页代码
在Window XP中快速锁定计算机
js定义类的几种方法(推荐)
SWNETSUP.EXE - SWNETSUP是什么进程 有什么用
评论列表
共有
0
条评论
发表评论
取消回复
登录
注册新账号
立即
投稿
微信扫一扫:分享
微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
返回
顶部
发表评论 取消回复