在BBS中如何实现分页?.docx

在BBS中如何实现分页?

代码和详细说明如下:

%@language=vbscript%

!--#includefile=connect.asp--

%page=Request.QueryString(page)Ifpage=Thenpage=1page=Cint(page)

%

html

head

TITLE精彩春风之BBS分页技术/title

/head

body

formaction=del.aspmethod=post

table

tr

td删除/td

td用户名/td

td密码/td

td管理员/td

td网址/td

td电子邮件/td

/tr

%strIndex=select*fromcom

Setrst=CreateObject(ADODB.RecordSet)rst.cursorlocation=3

将cursorlocation的值赋为3,否则不能取得总数

rst.openstrIndex,strProvider,2,3

打开数据库,cursortype和locktype的值分别为2和3,rst.PageSize=30

设置每页的记录数

tcount=rst.RecordCount取得所有记录的总数tpage=rst.PageCount

IfNotrst.BOFThen

取得页面的总

文档评论(0)

1亿VIP精品文档

相关文档