<table width="705" height="2031" border="0" align="right" cellspacing="0">
<tr>
<td height="28" bgcolor="#192731"><span class="STYLE6"> 作品赏析</span></td>
</tr>
<tr>
<td height="1836" valign="top">
<%sql="select s_id,s_s,s_name,s_title,s_img from small"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if not(rs.eof and rs.bof) then
rs.pagesize=20
pagenum=request.QueryString("pagenum")
if pagenum="" then
rs.absolutepage=1
pagenum=1
else
rs.absolutepage=pagenum
end if%>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<% j=0
do while not rs.eof and i<rs.pagesize
j=j+1
%>
<td width="120"><img src="<%=rs("s_img")%>" width="100" height="100" /></td>
<%
if j mod 4=0 then
response.Write("</tr><tr>")
end if
rs.movenext
loop
else
response.write("<td height='120'>暂无图片显示</td>")
end if%>
</tr>
</table></td>
</tr>
<tr>
<td height="15" valign="top"> 共<%=rs.pagecount%>页
<a href="?pagenum=1">首页</a>
<% PPage=PageNum-1
If PPage>0 then
strPage="<a href=?PageNum="&PPage&">前页</a> "
Response.Write(strPage)
end if %>
当前第<span class="STYLE4">
<%=pagenum%>
</span>页
<% NPage=PageNum+1
If NPage<=rs.PageCount then
strPage="<a href=?PageNum="&NPage&">后页</a>"
Response.Write(strPage)
end if %>
<a href="?pagenum=<%=rs.pagecount%>">未页</a></td>
</tr></table></td></tr>
</table>
<% rs.close
set rs=nothing
conn.close
set conn=nothing%>
出来的效果如下图
问题是这样的。
rs.pagesize=20
输出的却不止二十个
高手。帮帮吧。。急啊