<head>
<script type="text/javascript">
function
gotopage(
currentpage){
//统一调用此方法
var pagesize=document.getElementById("
pagesize").value;
window.location.href='${pageContext.request.contextPath}/servlet/ListCustomer currentpage='+currentpage+'&pagesize='+pagesize;
}
</script>
</head>
<body>
......... 共[${pagebean.totalrecord}]条记录,
每页<input type="text" id="pagesize" value="${pagebean.pagesize}" οnchange="gotopage(${pagebean.currentpage })" style="width:25px" maxlength="2">条记录,
共[${pagebean.totalpage }]页,当前第[${pagebean.currentpage }]页
<a href="javascript:void(0)" οnclick="
gotopage(${pagebean.previouspage})">
上一页</a>
<c:forEach
var="index" items="${pagebean.pagebar }">
//页码条
<c:if test="${pagebean.currentpage==index}">
//让当前被选中的页码红色显示并不具备连接功能
<font color="red">${index}</font>
</c:if>
<c:if test="${pagebean.currentpage!=index}">
<a href="javascript:void(0)" οnclick="
gotopage(${index})">${index }</a>
</c:if>
</c:forEach>
<a href="javascript:void(0)" οnclick="
gotopage(${pagebean.nextpage})">
下一页</a>
<input type="text" id="page" value="${pagebean.currentpage }">
//Go功能
<input type="button" value="GO" οnclick="
gotopage(
document.getElementById('page').value)">
</body>
|
分页HTML代码
最新推荐文章于 2025-03-10 12:52:38 发布