<% // Indicates that count is the total number of records
// Page is a user-submitted parameter used to control paging. The allowed values are positive integers and negative integers.
Int I = count/15; // total page, 15 records per page
Int j = I/10; // The total size of the page. If there are no 10 pages, a large page is displayed.
// Page
Int StartPage;
// Int HrefPage;
If (Page <0) Page = 0-Page * 10; // every 10 pages
StartPage = Page/10; // every 10 pages
Out. print ("[total" + I + "Page]");
// Out. print ("Total" + j + "screen ");
// Out. print ("display Page" + Page + "Page ");
// Out. print ("StartPage =" + StartPage );
If (StartPage> 0)
Out. print ("| <a href = \" connectmysql. jsp? Page =-"+ Integer. toString (StartPage-1) +" \ "> Top 10 pages </a> ");
For (int k = 0; k <10; k ++)
{Int p = StartPage * 10 + k;
If (p> I) break;
If (p = Page)
Out. print ("| No." + Integer. toString (p + 1) + "page ");
Else
Out. print ("| <a href = \" connectmysql. jsp? Page = "+ p +" \ "> page" + Integer. toString (p + 1) + "</a> ");
}
If (StartPage <j)
Out. print ("| <a href = \" connectmysql. jsp? Page =-"+ Integer. toString (StartPage + 1) +" \ "> next 10 pages </a> ");
Out. print ("| ");
%>