An ASP paging program (support jump and input numbers)

Source: Internet
Author: User
Sub Pcfinal_page
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 ("<br/><table class= ' table ' ><form method= ' get ' onsubmit=" "document.location = '" & action& "?" &temp& "Page= ' + This.page.value;return false;" " &GT;&LT;TR&GT;&LT;TD align= ' center ' > ')
If page<= 1 Then
Response.Write ("Home previous page")
Else
Response.Write ("<a href=" "&action&"?) &temp& "Page=1 ' > Home </a> <a href= '" &action& "?" &temp& "page=" & (page-1) & "> Previous page </a>")
End If
If page>= Maxpage Then
Response.Write ("next Page last")
Else
Response.Write ("<a href=" "&action&"?) &temp& "page=" & (page+1) & "> next page </a> <a href= ' &action&"? &temp& "page=" &maxpage& "' > Last </a>")
End If
Response.Write ("[" &page& "/" &maxpage& "page] [altogether" &allpage& "record] go to <input type= ' text ' name= ' Page ' size= ' 3 ' value= ' &page& ' > page <input type= ' submit ' value= ' jump '/></td></tr></form ></table> ")
End Sub
%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.