诚心请教这段ASP分页代码怎么改

来源:百度知道 编辑:UC知道 时间:2024/05/17 17:39:54
以下是代码,现在的显示/翻页方式是“首 页 上一页 下一页 尾 页 页次:1/102页 共有123种商品 转到页 ”,想改成“上一页 下一页”之间有数字页的翻页连接。如“上一页 1 2 3 4... 10 下一页”如果翻到21页那么显示的方式要是“上一页 2 3 4 5... 20 下一页”望高手不吝赐教,谢谢!!!!
---------------------------------------------------------------
<%
call PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next

Response.Write("

你拿去研究一下
<%
if rs.eof then
response.Write "<tr><td colspan='8'>数据初始化,没有相应的数据!</td></tr>"
else
dim page, i
page=request.QueryString("page")
if page="" then
page=1
else
page=Cint(page)
end if
Section=request.QueryString("section")
if Section="" then

Section=1
else
Section=Cint(Section)
end if
'变量赋值
intPageSize=5 '每页显示记录数
intSectionSize=10 '多少页为一段,像GOOGLE一样
PrevSectionText="<FONT face=webdings>7</FONT>" '上一段的链接文字
NextSectionText="<FONT face=webdings>8</FONT>" '下一段的链接文字
PrevPageText="<FONT face=webdings>3</F