简单介绍一下在动态网页里面的jquery.pagination.js分页的使用,具体内容如下
添加下载的js和样式,主要是先添加jquery.js 再添加jquery.pagination.js,我这是下载好的,放在本地
<link rel="stylesheet" href="<%=path%>css/pagination.css" type="text/css">
<script type="text/javascript" src="<%=path%>js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="<%=path%>js/jquery.pagination.js"></script>表格,用的是c标签,获取控制器传过来的值
<table width="1052" border=0 align=center cellpadding=2 cellspacing=1
bordercolor="#799AE1" class=tableBorder>
<tbody>
<tr>
<th align=center colspan=16 style="height: 23px">商品显示</th>
</tr> <tr align="center" bgcolor="#799AE1" style="height:28px">
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>商品编号</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>商品大类</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>商品名称</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>商品规格</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>加权进价</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>当前售价</td>
<td width="10%" align="center" class=txlHeaderBackgroundAlternate>操作</td>
</tr>
<c:forEach items="${goodsS}" var="goods">
<tr bgcolor="#DEE5FA">
<td align="center" id="goodsId" class="txlrow"><c:out
value="${goods.goodsId}"></c:out></td>
<td align=center id="goodsType" class=txlrow><c:out
value="${goods.goodsType}"></c:out></td>
<td align=center id="goodsName" class=txlrow><c:out
value="${goods.goodsName}"></c:out></td>
<td align=center id="goodsContent" class=txlrow><c:out
value="${goods.goodsContent}"></c:out></td>
<td align=center id="goodsPrice" class=txlrow><c:out
value="${goods.goodsPrice}"></c:out></td>
<td align=center id="goodsSell" class=txlrow><c:out
value="${goods.goodsSell}"></c:out></td>
<td align=center class=txlrow> <input type="button" value="编辑"></td>
</tr>
</c:forEach>
</tbody>
</table>
<!--分页显示-->
<div id="Pagination"></div>
js










