发布网友 发布时间:2022-04-23 17:30
共1个回答
热心网友 时间:2022-04-22 15:06
<script type="text/javascript">
function nextPage(){
if(${current_page}==${pages}){
alert("已经是第一页了!");
}else{
window.location="BookServlet?type=list¤t_page=${current_page}&operation=1";
}
}
function prePage(){
if(${current_page}==1){
alert("已经是最后一页了!");
}else{
window.location = "BookServlet?type=list¤t_page=${current_page}&operation=2";
}
}
</script>
HTML代码
<div id="book_paging">
<a href="javascript:void(0);" onclick="prePage();">上一页</a>
<a href="javascript:void(0);" onclick="nextPage();">下一页</a>
</div>