首 页
网络学院
视频教程
资源下载
HOT
实例教程
图文教程
专题中心
学习社区
繁體中文
当前位置:
首页
>
图文教程
>
网络编程
>
ASP
> 本人常用的分页代码
ASP
随机提取Access/SqlServer数据库中的10条记录的SQL语句
实现对Access数据库表重命名的一段代码
XML+XSL+CSS+ASP打造留言簿
小偷&小偷入库&采集入库
使用asp代码突破163相册的防盗连
CJJ专用ASP类库中的某个class
能不能在flash动画中给asp传递变量?
禁止站外提交表单
改进一下asp自带的formatNumber函数
收集asp的常用函数
CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格
ASP 指南
pjblog2的参数
ASP智能搜索的实现
网站生成静态页面攻略2:数据采集
网站生成静态页面攻略3:防采集策略
网站生成静态页面攻略4:防采集而不防搜索引擎策略
简单分页函数一 常用
asp最常用的分页函数
asp:生成静态页面函数
No.
«
‹
31
32
33
34
›
»
技术文章搜索
关键字
ASP 中的 本人常用的分页代码
出处:
互联网
整理:
软晨网(RuanChen.com)
发布:
2009-09-13
浏览: 41 ::
收藏到网摘: n/a
截取实际长度字符串,并用空格替换
一句话木马连接客户端
点击运行可以看到效果:
个人会员管理
个人会员列表
序号
用户名
加入日期
等级
操作
<% 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
">
<%=rs("dxy_username")%>
<%=rs("datetime")%>
<%=rs("dj")%>
">修改
)">删除
<% 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 %> 共有<%=totalnumber%>/<%=maxperpage%>条, 当前页<%=currentpage%>/<%=n%> <%if currentpage<2 then%> [首页] [上一页] <%else%>
[首页]
[上一页]
<%end if%><% if n-currentpage<1 then%> [下一页] [尾页]<%else%>
[下一页]
[尾页]
<%end if%> 转到:
<%for j=1 to n if currentpage=j then %>
<%=j%>
<% else %>
<%=j%>
<% end if next %>
<% end function %>
[Ctrl+A 全选 提示:你可先修改部分代码,再按运行]
截取实际长度字符串,并用空格替换
一句话木马连接客户端
评论 (0)
All
登陆
还没注册?