cf申请体验服:如何用asp分页显示?

来源:百度文库 编辑:高校问答 时间:2024/05/03 06:37:12
各位高手能不能帮我修改一下啊,谢谢了
<table width="762" height="5" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="f5f5f5" class="tablelinenotop">
<tr>
<td></td>
</tr>
<tr>
<td height="1" bgcolor="#CCCCCC"></td>
</tr>
</table>
<table width="762" height="378" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tablelinenotop">
<tr>
<td width="170" valign="top" bgcolor="f5f5f5">
<div align="center">

<table width="100%" height="47" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/image/ppzx.gif" width="170" height="50"></td>
</tr>
<tr>
</tr>
</table>

</div></td>
<td width="1" bgcolor="#cccccc"></td>
<td width="583" valign="top"><table width="96%" height="44" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/image/whdt.gif" width="200" height="40"></td>
</tr>
</table>
<table width="90%" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"></td>
</tr>
</table>
<% Pages=Request.QueryString("Page")
if Int(Pages)="" or int(page)<1 then
currentPage=1
else
currentPage=cint(Pages)
end if
strsql="select id,title,datetime from whdt order by id desc"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 1
if not rs.eof then
pages=30
allPages=rs.pageCount
page=Request.QueryString("page")
if isEmpty(page) or Cint(page)<1 then
page=1
elseif Cint(page)>allPages then
page=allPages
end if
rs.AbsolutePage=page
Do while not rs.eof and pages>0
%>

<table width="99%" border="0" cellpadding="0" cellspacing="0">
<% while not rs.eof %>
<tr class="font">
<td width="12%">
<div align="right"><img src="image/best_zoom.gif" width="19" height="18">
 </div></td>
<td width="88%" height="30"><a href="whdt_view.asp?id=<%= rs("id") %>">
<% =rs("title") %>
</a> [<%= rs("datetime") %>]</td>
</tr>
<%

rs.movenext
wend
%>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
</table> </td>
</tr>
</table>
那你帮我修改一下啊,我不太懂

差得太远了,是这个代码运行会出错,还是贴的代码不完整????