| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2105 人关注过本帖
标题:[公告]大家把自己写的分页发到这里来,看谁的好,谁的短
取消只看楼主 加入收藏
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
结帖率:0
收藏
 问题点数:0 回复次数:2 
[公告]大家把自己写的分页发到这里来,看谁的好,谁的短
大家把自己写的分页发到这里来,看谁的好,谁的短,让大家pp拉
搜索更多相关主题的帖子: 公告 
2004-06-24 16:43
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
收藏
得分:0 

我的有上一页,下一页,数字页,第一页和最后一页

<!--#include file="conn.asp"--> <head> <meta http-equiv="Content-Language" content="zh-cn"> </head>

<% sql="select * from allbook order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.recordcount=0 then 'rs.recordcount 所有记录数' response.write("数据库没有相关信息") else pgsz=5 rs.pagesize=cint(pgsz) totel=rs.recordcount pagecount=int(totel/pgsz*-1)*-1 pageno=request("pageno") 'pageno为当前页 if pageno="" then pageno=1 end if end if %> <% if (pageno-1)*pgsz<totel then rs.move pgsz*(pageno-1) '指针移到pgsz*(pageno-1)记录上 end if %> <% dim i i=0 do while not rs.eof and i<pgsz

%> <table cellpadding="0" cellspacing="0" width="770" height="119"> <!-- MSTableType="layout" --> <tr> <td valign="middle"> 书名:<%=rs("bookname")%></td> <td width="97"> 作者:<%=rs("zuozhe")%></td> <td width="173"> 出版社:<%=rs("chubanshe")%></td> <td width="140"> 出版时间:<%=rs("outtime")%></td> <td width="123"> 类别:<%=rs("leibie")%></td> <td height="23" width="117"> 价钱:<%=rs("piece")%></td> </tr> <tr> <td valign="top" width="120">  </td> <td valign="top" colspan="5" height="96"> <table style="table-layout:fixed" border="0" width="100%" cellspacing="0" cellpadding="0" id="table1"> <tr> <td width="61" style="word-break:break-all" valign="top">简介:</td> <td><%=rs("jianjie")%></td> </tr> </table> </td> </tr> </table>

<%rs.movenext loop %> </div>

<div align="center"> <table cellpadding="0" cellspacing="0" width="770" height="20"> <!-- MSTableType="layout" --> <tr> <td valign="top" height="20" width="770"><a href="fenye.asp?pageno=1"> <span style="text-decoration: none">第一页</span></a>| <% if pagecount>1 then a=pageno-1 b=pageno+1 if a>0 then response.write "<a href=fenye.asp?pageno=" response.write a response.write "><<<</a>| " end if for i=1 to pagecount response.write "<a href=fenye.asp?pageno=" response.write i response.write ">" response.write i response.write"</a> " next if pageno*pgsz<totel then response.write " |<a href=fenye.asp?pageno=" response.write b response.write ">>>></a> |" end if response.write "<a href=fenye.asp?pageno=" response.write pagecount response.write "><span style='text-decoration: none'>最后一页</span></a>" end if %> <% rs.close set rs=nothing %> <% closeconn %></td> </tr> </table> </div>


59ita点com(我就爱TA)
2004-06-24 21:55
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
收藏
得分:0 

用javascript就可以阿,在dw那里用“行为”作就可以!

代码我就没有写,如果还是搞不好就再问阿!我很久没有写asp的程序了,要补补啊,我在学.net

如果你还是写不出我才写好吗?


59ita点com(我就爱TA)
2004-09-02 21:07
快速回复:[公告]大家把自己写的分页发到这里来,看谁的好,谁的短
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011855 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved