寻一ASP分页代码

来源:百度知道 编辑:UC知道 时间:2024/06/30 10:24:35
要求:
共31页: 1 2 3 4 5 6 7 8 9 10 [下一页] [后10页] [首页] [末页]
10页后点击下一页接变成11-20
类似这种即可

<%

'----------------------------------------

' 获取当前页带参数的地址

'----------------------------------------

Function Urladdress()

Dim uAddress,ItemUrl,Mitem,Get_Url,get_c,getstr

 uAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))

 ItemUrl = ""

 If (Request.QueryString <> "") Then

  uAddress = uAddress & "?"

  For Each Mitem In Request.QueryString

   If LCase(MItem)<>"page" and LCase(MItem)<>"pageno" then

    ItemUrl = ItemUrl & MItem &"="& trim(Server.URLEncode(Request.QueryString(""&MItem&""))) & "&"

   end