|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
[asp]关于分页的一段代码--在线等
版主你好,我购买了<asp+access组建动态网站实例精讲>这本书,里面的例子有点看不懂,想请你帮忙解释一下。
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
showpages
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpages
showContent
showpages
else
currentPage=1
showpages
showContent
showpages
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
这一段看不懂,能否详细的告知它的意思,我是新手,请讲的浅显一些
谢谢
cruuentpage是当前页码
maxperpage是一页最大显示数
totalput是信息总数
if(currentpage-1)*maxperput>totalput 是什么意思
if(currentpage-1)*maxperput<totalput
rs.move 又是什么意思。
没办法。菜菜鸟一个,怎么也想不明白。希望各位高手能讲的浅显一些。谢谢 |
if(currentpage-1)*maxperput>totalput
if(currentpage-1)*maxperput<totalput
大于信息总数说明当前页是最后一页
用DW的服务器行为点点鼠标就完成了,何必自己动手
|
springfeng在上个帖子中说
非常不同意楼上的这种 不求甚解的态度 |
|