为什么翻页不了??
<!-- #include file="ADOFunctions1.inc" --> <script language="vbscript">
sub gopage()
if window.event.keycode=13 then '若按回车键
page=document.formpage.pagenum.value '获取文本框中输入的页号
window.location.href="GuestBook.asp?pagenum=<%=page%>"
end if
end sub
</script>
<%
'从数据表中读取记录并存放在Recordset对象中
sqll="select * from duishou"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.open sqll,objConn,3
If ObjRs.eof and ObjRs.bof Then
Response.write "没有记录"
Response.End()
End if
'读取“liuyan”数据表的所有记录
'设置分页大小,您可视实际情况设置其他数值
objRS.PageSize =1
if request.querystring("pagenum")="" then
pagenum=1
else
pagenum=clng(request.querystring("pagenum"))
end if
objRS.absolutepage=pagenum
%>
<html>
<head><title> 分页显示数据</title></head>
<body bgcolor="#F9FFF0" text="#000000">
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<form name="formpage">
<%
response.write"共"&objRS.recordcount&"条记录,第"&pagenum&"/"&objRS.pagecount&"页 "
if pagenum=1 then
response.write "[上一页]"
else
%>
[<a href=file:///C|/Documents%20and%20Settings/zlp/桌面/GuestBook.asp?pagenum=<%=pagenum-1%>>上一页</a>]
<%
end if
if pagenum=objRS.pagecount then
response.write "[下一页]"
else
%>
[<a href=file:///C|/Documents%20and%20Settings/zlp/桌面/GuestBook.asp?pagenum=<%=pagenum+1%>>下一页</a>]
<%
end if
if pagenum>1 then
%>
[<a href=file:///C|/Documents%20and%20Settings/zlp/桌面/GuestBook.asp?pagenum=1>首页</a>]
<%
else
response.write "[首页]"
end if
if pagenum<objRS.pagecount then
%>
[<a href=file:///C|/Documents%20and%20Settings/zlp/桌面/GuestBook.asp?pagenum=<%=objRS.pagecount%>>尾页</a>]
<%
else
response.write "[尾页]"
end if
%>
第<input type=text size=4 name="pagenum" onkeypress="gopage()">页
</form>
</td>
</tr>
</table>
<%
'显示留言并加以格式化
objRS.AbsolutePage = PageNum
%>
大家帮我看看为什么错~~