回复 3楼 liang198207
部分代码:
<%
set rst=server.createobject("adodb.recordset")
sql="select * from xueshen_biao order by id desc"
rst.open sql,strConn,3,1
if Not(rst.bof and rst.eof) then'判别数据表中是否为空记录
NumRecord=rst.recordcount
rst.pagesize=10
NumPage=rst.Pagecount
page= int (request("page"))
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then
NoncePage=NumPage
end if
end if
%>
<table width="600" border="1" cellpadding="6" cellspacing="0">
<tr>
<td colspan="6" align="center" valign="middle"><h3>学生信息中心</h3></td>
</tr>
<tr>
<td align="center"><strong>姓名</strong></td>
<td align="center"><strong>年龄</strong></td>
<td align="center"><strong>性别</strong></td>
<td align="center"><strong>班级</strong></td>
<td align="center"><strong>电话</strong></td>
<td align="center"><strong>宿舍</strong></td>
</tr>
<%if Not(rst.bof and rst.eof) then
rst.move (Cint(NoncePage)-1)*10,1
for i=1 to rst.pagesize
%>