<% @ Language = "VBScript" codePage = "65001" %>
<! -- # Include file = "conn. asp" -->
<%
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select * from student"
Rs. Open SQL, Conn, 1, 1
Rs. pagesize = 5
If request ("page") <> "then
Page = CINT (Request ("page "))
If page <1 then page = 1
If page> Rs. pagecount then page = Rs. pagecount
Else
Page = 1
End if
Rs. absolutepage = page
%>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document </title>
</Head>
<Body>
<Form name = "form1" method = "Post" Action = "">
<Table width = "418" border = "1">
<Tr>
<TD> id </TD>
<TD> name </TD>
<TD> gender </TD>
<TD> age </TD>
<TD> operation </TD>
</Tr>
<%
For I = 0 to Rs. pagesize-1
If Rs. BOF or Rs. EOF then exit
%>
<Tr>
<TD> <% = RS ("ID") %> </TD>
<TD> <% = RS ("username") %> </TD>
<TD> <% = RS ("Age") %> </TD>
<TD> <% = RS ("sex") %> </TD>
<TD>
<A> </a>
<A href = "http://www.jscss8.com/baomingDelete.asp? Id = <% = RS ("ID") %> & page = <% = Page %> "onclick =" Return confirm ('Are you sure you want to delete it? ') "> Delete </a>
</TD>
</Tr>
<%
Rs. movenext ()
Next
%>
<Tr>
<TD colspan = "5">
<P align = "center">
<A href = "http://www.jscss8.com/baomingList.asp? Page = 1 "> homepage </a> & nbsp;
<A href = "http://www.jscss8.com/baomingList.asp? Page = <% = page-1%> "> previous page </a> & nbsp;
<A href = "http://www.jscss8.com/baomingList.asp? Page = <% = page + 1%> "> next page </a> & nbsp;
<A href = "http://www.jscss8.com/baomingList.asp? Page = <% = Rs. pagecount %> "> last page </a>
</P>
<P align = "center"> page <% = Page %> <% = Rs. pagecount %> </P>
</TD>
</Tr>
</Table>
</Form>
<%
Rs. Close
Set rs = nothing
Conn. Close ()
%>
</Body>
</Html>