下面小编就为大家带来一篇jsp页面数据分页模仿百度分页效果(实例讲解)。小编觉得挺不错的,现在就分享jsp源码给大家,也给大家做个参考。对jsp感兴趣的一起跟随小编过来看看吧
废话不多说,直接上代码
请根据自己的项目、包名修改
nbsp;html>数据分页 .page a{ min-width: 34px; height: 34px; border: 1px solid #e1e2e3; cursor: pointer; display:block; float: left; text-decoration: none; text-align:center; line-height: 34px; } .page a:HOVER { background: #f2f8ff; border: 1px solid #38f ; } .page a.prev{ width:50px; } .page span{ width: 34px; height: 34px; border: 1px solid transparent; cursor: pointer; display:block; float: left; text-decoration: none; text-align:center; line-height: 34px; cursor: default; }
登录后复制
ID姓名
年龄
专业
pageCount ? pageCount : currPage; PreparedStatement pst = conn.prepareStatement(“select * from student limit ?,?”); pst.setInt(1,currPage*pageSize-pageSize); pst.setInt(2,pageSize); ResultSet rs = pst.executeQuery(); while(rs.next()){ %>
首页”,1)); if(currPage>=7){ start=currPage-5; end=currPage+4; } if(start>(pageCount-10)){ start=pageCount-9; } if(currPage>1){ out.print(String.format(“上一页”,currPage-1)); } for(int i=start;ipageCount) break; String pageinfo=String.format(“%d”,i,i); if(i==currPage){ pageinfo=String.format(“%d”,i); } out.print(pageinfo); } if(currPage下一页”,currPage+1)); } out.print(String.format(“尾页”,pageCount)); %>
以上这篇jsp页面数据分页模仿百度分页效果(实例讲解)就是小编分享给大家的全部内容了,希望能给大家一个参考!!
相关推荐:
实例讲解
实例讲解
实例讲解
以上就是jsp页面数据分页模仿百度分页效果(实例讲解)的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2790984.html