人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統下載站 > 技術開發教程 > 詳細頁面

容易的分頁函數

容易的分頁函數

更新時間:2021-01-25 文章作者:未知 信息來源:網絡 閱讀次數:

<%
on error resume next
'分頁程序
function fy(scount,pgsize,pg,url)
'scount記錄總數
'pgsize每面記錄數
'pg當前頁
'url轉向的地址,運行本函數后會在后面加上"&page=頁號"
dim pgcount,i,j,mh,k
mh=chr(34) '不好意思,是雙引號


'cint()會四舍五入,所以不得不加個k
k=(scount+pgsize-1)/pgsize
pgcount=cint((scount+pgsize-1)/pgsize)
if pgcount>k then pgcount=pgcount-1

response.write "<a href="+mh+url+"&page=1"+mh+">[第一頁]</a>&nbsp;"
if cint(pg)>cint(1) then
response.write "<a href="+mh+url+"&page="+cstr(pg-1)+mh+">[上一頁]</a>&nbsp;"
end if
if cint(pg)>5 then
i=cint(pg)-5
else
i=1
end if

if cint(pgcount)<cint(pg+5) then
j=pgcount
else
j=pg+5
end if


while cint(i)<=cint(j)

if cint(i)=cint(pg) then
response.write cstr(i)+"&nbsp;"
else
response.write "<a href="+mh+url+"&page="+cstr(i)+mh+">"+cstr(i)+"</a>&nbsp;"
end if
i=i+1
wend

if cint(pgcount)>cint(pg) then
response.write "<a href="+mh+url+"&page="+cstr(pg+1)+mh+">[下一頁]</a>&nbsp;"
end if

response.write "<a href="+mh+cstr(url)+"&page="+cstr(pgcount)+mh+">[最后頁]</a>&nbsp;"

end function
%>

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統下載排行

網站地圖xml | 網站地圖html
主站蜘蛛池模板: 阜康市| 瑞昌市| 兴城市| 格尔木市| 独山县| 德庆县| 秀山| 灵台县| 阳高县| 焉耆| 东阿县| 贵溪市| 辛集市| 毕节市| 蕲春县| 辽中县| 昌吉市| 蓬莱市| 含山县| 河北区| 古田县| 五家渠市| 鹤壁市| 拉萨市| 临沭县| 嘉黎县| 蓬安县| 灯塔市| 宜黄县| 罗江县| 女性| 宁河县| 黄大仙区| 孙吴县| 阿荣旗| 庐江县| 翁牛特旗| 涞源县| 和田县| 城口县| 湘潭县|