rs.PageSize = 翻页数
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="37%" align="center" bgcolor="#EFF7FF">
<%if rs.pagecount > 0 then%>
当前页<%=intpage%>/<%=rs.PageCount%>
<%else%>
当前页0/0
<%end if%></td>
<td width="12%" bgcolor="#EFF7FF"><a href="Manage_product.asp?page=1">第一页</a></td>
<%if pre then%>
<td width="7%" bgcolor="#EFF7FF"><a href="Manage_product.asp?page=<%=intpage -1%>">上页</a>
<%end if%></td><%if last then%>
<td width="10%" bgcolor="#EFF7FF"><a href="Manage_product.asp?page=<%=intpage +1%>">下页</a></td>
<%end if%>
<td width="10%" bgcolor="#EFF7FF"><a href="Manage_product.asp?page=<%=rs.PageCount%>">尾页</a></td>
<td width="24%" align="right" bgcolor="#EFF7FF">转到第
<select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = intpage then%>
<option value="Manage_product.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="Manage_product.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font></td>
</tr>
</table>