找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 113|回复: 2

[求助]这段分页到底哪错了 重新编辑过了

[复制链接]
发表于 2010-1-20 03:30:15 | 显示全部楼层 |阅读模式 IP:江苏扬州
<%
'定义分页显示的变量
dim totalcs,Currentpage,totalpages,i
neirong=trim(request("neirong"))
fangshi=request("fangshi")
....................................................................
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
'统计记录数
totalcs=rs.recordcount
if rs.bof and rs.eof then
%>
<script language="JavaScript">
alert("检索不到,请确定重新搜索!");
location.href = "right.asp";
[知识问答ωωω.χiuGoo.сom]
</script>
<%
else
rs.movefirst
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
if currentpage<>1 then
if (currentpage-1)*20<totalcs then
rs.move(currentpage-1)*20
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalcs mod 10)=0 then
totalpages=totalcs\10
else
totalpages=totalcs\10+1
end if
i=0
%>

<%
do while not rs.eof and i<10
%>


............................................................

<%
i=i+1
rs.movenext
loop
end if
%>

<img height=14 width=14 align=absMiddle src="../南京便民房屋/images/cha.gif">&nbsp;共搜索到<font color="red">[<%=totalcs%>]</font>条记录&nbsp;&nbsp;分<font color="red">[<%=totalpages%>]</font>页&nbsp;&nbsp;&nbsp;&nbsp;
<IMG height=11 src="../南京便民房屋/images/lt.gif" width=11 align=absMiddle>

<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=SearchResult.asp?page=1>首页</a> "
response.write "<a href=SearchResult.asp?page="&CurrentPage-1&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=SearchResult.asp?page="&CurrentPage+1&""
response.write ">下一页</a> <a href=SearchResult.asp?page="&totalpages&">尾页</a>"
end if
%>
发表于 2010-3-20 01:05:05 | 显示全部楼层 IP:河南
路过....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 07:21 , Processed in 0.192014 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表