求类似百度的asp分页程序

来源:百度知道 编辑:UC知道 时间:2024/05/12 05:24:55
求类似百度的asp分页程序
1 [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页 [尾页]

一点10就变成

[首页] 10 [11] [12] [13] [14] [15] [16] [17] [18] [19] 下一页 [尾页]
楼下的兄弟没说明当面显示多少条记录啊

function pagenum(page,pagesum,actcs)
if cint(page)>10 then
ks=page-5
js=page+5
if ks<1 then
ks=1
js=ks+10
end if
if js>cint(pagesum) then
js=pagesum
ks=js-10
end if
else
if cint(pagesum)>11 then
ks=1
js=11
else
ks=1
js=pagesum
end if
end if
if page<>1 then
response.Write("<a href='" & actcs & "1'>首页</a> <a href='" & actcs & page-1 &"'>上一页</a> ")
else
response.Write("首页 上一页 ")
end if
for i= ks to js
if i<10 then
if cint(i)=cint(page) then
response.Write("<font color='#FF0000'>0"& i & "</font> ")
else
response.Write("<a href='" & actcs & i &"'>0"& i & "</a> ")
end if
else
if cint(i)=cint(p