<%@ Language=vbscript%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
Dim CurrentPage ' Defines the current page
Dim filename ' filename
Const maxperpage=20 ' number of records displayed per page
Dim Totalnumber ' Total Records
Filename= "Showpages.asp"
totalnumber=200 ' Set record total of 200
If not IsEmpty (Request ("page") Then
Currentpage=cint (Request ("page")
Else
Currentpage=1
End If
Showpages Totalnumber,maxperpage,filename
%>
</BODY>
</HTML>
<% ' defines the paging function, with Totalnumber,maxperpage,filename as the entry for the function.
function Showpages (totalnumber,maxperpage,filename)
Dim n
If Totalnumber mod maxperpage=0 then
n= Totalnumber Maxperpage
Else
n= Totalnumber maxperpage+1
End If
Response.Write "<form method=post action=" &filename& ">"
Response.Write "<p align= ' center ' > Record Paging "
If Currentpage<2 Then
Response.Write "<font color= ' 999966 ' > Home prev </font> "
Else
Response.Write "<a href=" &filename& "?page=1> home </a> "
Response.Write "<a href=" &filename& "page=" &CurrentPage-1& "> previous page </a> "
End If
If N-currentpage<1 Then
Response.Write "<font color= ' 999966 ' > Next End </font>"
Else
Response.Write "<a href=" &filename& "page=" & (Currentpage+1)
Response.Write "> Next </a> <a href=" &filename& "? page=" &n& "> Last </a>"
End If
Response.Write " page: <strong><font color=red>" &CurrentPage& "</font>/" &n & "</strong> page "
Response.Write "goto: <input type= ' text ' name= ' page ' size=4 maxlength=10
Value= "¤tpage&" > "
Response.Write "<input class=buttonface type= ' Submit ' value= ' Goto ' name= ' Cndok ' ></span></p></ Form> "
End Function
%>
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