說明:
本函數為文章分頁
本函數實現將文章分頁顯示
本函數實現不需指定 URL
本函數實現返回多個結果
如果分頁大小大於文章總大小
顯示如:
第
正文
注: 顯示內容的三個元素可自由變更位置
附注:
如果您是在查找 記錄集分頁函數
鏈接:
shawl
主內容: 分頁函數及調用代碼
linenum
<%
dim rs
set rs=createObject(
rs
set dic=fAtPgnt(rs(
response
response
response
set dic=nothing
rs
set rs=nothing
function fAtPgnt(aStr
if isNumeric(pSize)=false or len(aStr)=
if isNull(rId) or rId=
dim aStrLen
aStrLen=len(aStr)
dim rqs
rqs=request
rName=
if rqs=
url=
elseif instr(rqs
url=
else
url=
end if
dim tPg
tPg=int(aStrLen/
if rId<
if cLng(rId)>cLng(tPg) then rId=tPg
dim cPg
if rId=
dim dic
set dic = createObject(
if aStrLen<=pSize then
dic
dic
formatNumber(aStrLen
dic
set fAtPgnt=dic
set dic=nothing
exit function
end if
dim i
for i=
if strComp(rId
temp=temp&
next
dic
dic
formatNumber(aStrLen
dic
set fAtPgnt=dic
set dic=nothing
end function
%>
From:http://tw.wingwit.com/Article/program/net/201311/13749.html