% function pagebar(pagect,curtpage,url) if not curtpage>0 then curtpage=1 pagestart=fix(curtpage/10)*10 '该算法返回小于当前页的最近的倍10分界 pageend=int(curtpage/10+1)*10 '该算法返回大于当前页的最近的倍10分界 if pageend>pagect then pageend=pagect if pageend-pagestart>10 then pagestart=pagestart+10 firstpage=1 lastpage=pagect previopage=curtpage-1 if previopage<=0 then previopege=1 nextpage=curtpage+1 if nextpage>pagect then nextpage=pagect response.write "首页 " response.write "上一页 " if PageNo<10 then pagestart=pagestart+1 for i=pagestart to pageend response.write ""&i&" " next response.write "下一页 " response.write "尾页" end function %>
|
|||||||||||||||||||||||||||||||||||