int currentPage = 1;//当前页;
int pageRow = 15;//每页行数
int iRows = 0;//总行数
int pages = 0;//总页数
//计算总页数
获取具体的currentPage 、pageRow 、iRows 、pages 的值
pages = iRows%pageRow==0 ? iRows/pageRow : iRows/pageRow+1;
<table id='pending3' width="95%" align="center" bgcolor="#ffffff" cellSpacing="1" cellPadding="1" border="0">
<tr>
<td align='left' valign=bottom width=50%>
<%
if( 0 == pages || (currentPage==1 && currentPage==pages) ){ %>
<img src='<%=OMSROOT%>images/bbs_004.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_005.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_006.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_007.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<% }else if( currentPage==1){ %>
<img src='<%=OMSROOT%>images/bbs_004.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_005.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_006.gif' onClick="fnChangePage(<%=currentPage+1%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_007.gif' onClick="fnChangePage(<%=pages%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<% }else if(currentPage==pages){ %>
<img src='<%=OMSROOT%>images/bbs_004.gif' onClick="fnChangePage(1)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_005.gif' onClick="fnChangePage(<%=currentPage-1%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_006.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_007.gif' style='border:0px none;vertical-align:middle;cursor:pointer'/>
<% }else{ %>
<img src='<%=OMSROOT%>images/bbs_004.gif' onClick="fnChangePage(1)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_005.gif' onClick="fnChangePage(<%=currentPage-1%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_006.gif' onClick="fnChangePage(<%=currentPage+1%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<img src='<%=OMSROOT%>images/bbs_007.gif' onClick="fnChangePage(<%=pages%>)" style='border:0px none;vertical-align:middle;cursor:pointer'/>
<% } %>
</td>
<td align='right' valign='bottom' width=50%>
<label>第<%=currentPage%>页</label>
<label>共<%=pages%>页</label>
<label>共<%=iRows%>条</label>
<label>本页<%=pages==currentPage?iRows-((currentPage-1)*pageRow):pageRow%>/<%=iRows%>条</label>
</td>
</tr>
<table>