<%@ 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 ()
Dim n
if (totalnumber mod maxperpage) =0 Then
n= Totalput Maxperpage
Else
n= Totalput Maxperpage + 1
End If
If N=1 Then
Exit Sub
End If
Dim k
Response.Write "<p align= ' left ' >>> Paging "
For K=1 to N
If K=currentpage Then
Response.Write "[<b>" +cstr (k) + "</B>]"
Else
Response.Write "[<b>" + "<a href=" &filename& "page=" +cstr (k) + ">" +cstr (k) + "</a></b> ] "
End If
Next
Response.Write "</p>"
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