恳请高手指点,不胜感激!
<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
<TD>
<P align="center">企业名称</P>
</TD>
<TD>
<P align="center">企业关键字</P>
</TD>
<TD>
<P align="center">企业性质</P>
</TD>
<TD>
<P align="center">企业缩写</P>
</TD>
<TD>
<P align="center">操作</P>
</TD>
</TR>
<%
rsBaoMing.PageSize = 10
if IsEmpty(request("page")) then
page=1
else
if not IsNumeric(request("page")) then
page=1
else
page=CLng(request("page"))
end if
end if
if page<1 then page=1
if page>rsBaoMing.pagecount then page=rsBaoMing.pagecount
if not rsBaoMing.eof then
rsBaoMing.AbsolutePage=page
cc=page*rsBaoMing.pagesize
if cc>rsBaoMing.recordcount then
cc=rsBaoMing.recordcount
end if
end if
if not rsBaoMing.EOF then
for x=1 to rsBaoMing.PageSize
%>
<TR>
<TD width="40%" align="center">
<%=rsBaoMing("CorporationName")%>
</TD>
<TD width="15%" align="center">
<%=rsBaoMing("CorporationKeyWord")%>
</TD>
<TD width="15%" align="center">
<%=rsBaoMing("CorporationKind")%>
</TD>
<TD width="20%" align="center">
<%=rsBaoMing("CorporationAbbreviate")%>
</TD>
<TD width="10%" align="center">
<a href="baomingInfo.asp?id=<%=rsBaoMing("id")%>">查看</a>
</TD>
</TR>
<%
rsBaoMing.MoveNext
if rsBaoMing.EOF then
exit for
end if
next
end if
%>
</TABLE>
<table align="right">
<tr align="right">
<td>
<%
if rsBaoMing.pagecount>0 then
pc=rsBaoMing.pagecount
if page <> 1 then
response.write " <a href='baomingList.asp?page=1'>首页</a> |"
response.write " <a href='baomingList.asp?page="&(page-1)&"'>前页</a> |"
else
response.write " 首页 | 前页 |"
end if
if page <> rsBaoMing.pagecount then
response.write " <a href='baomingList.asp?page=" & (page+1) & "'>后页</a> |"
response.write " <a href='baomingList.asp?page=" & rsBaoMing.pagecount &"'>尾页</a> "
else
response.write " 后页 | 尾页 "
end if
response.write " 第 " & page & " /" & rsBaoMing.pagecount & " 页"
end if
%>
</td>
</tr>
</table>
这是我常用的分页