首 页
网络学院
视频教程
资源下载
HOT
实例教程
图文教程
专题中心
学习社区
繁體中文
当前位置:
首页
>
图文教程
>
网络编程
>
ASP
> 本人常用的分页代码
ASP
JS复制特定内容到粘贴板
ASP+Access数据库安全设置方法小结
ADSI+ASP添加IP到IIS禁止访问列表中
ASP Google的translate API代码
最小asp后门程序
asp xml 缓存类
asp 过滤尖括号内所有内容的正则代码
ASP去掉字符串头尾连续回车和空格的Function
ASP IE地址栏参数的判断
SQL 注入式攻击的终极防范
ASP也使用ORM,给ASP上所有的SQL注入画上句号
判断Session的过期时间 采用JavaScript实时显示剩余多少秒
asp 动态生成rss(不成生xml文件)代码
ASP XML制作菜单管理程序
asp之自动闭合HTML/ubb标签函数附简单注释
asp 读取文件和保存文件函数代码
asp 随机字符串函数
asp form 表单验证函数
ASP 循环导入导出数据处理 不使用缓存
asp 数据库连接函数代码
No.
«
‹
81
82
83
84
›
»
技术文章搜索
关键字
ASP 中的 本人常用的分页代码
出处:
互联网
整理:
软晨网(RuanChen.com)
发布:
2009-09-13
浏览: 37 ::
收藏到网摘: n/a
浅谈 ASP 模板技术之参数传递
也谈采集入库的技术
点击运行可以看到效果:
个人会员管理
个人会员列表
序号
用户名
加入日期
等级
操作
<% 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 全选 提示:你可先修改部分代码,再按运行]
浅谈 ASP 模板技术之参数传递
也谈采集入库的技术
评论 (0)
All
登陆
还没注册?