<div id="pagination"> <%-- 显示翻页链接 --%> <%-- &les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>--%> <a href="?page=<%= Math.max(1, currentPage - 1) %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= currentPage == 1 ? "class=\"disabled page-link\"" : "class=\"page-link\"" %> >« 上一页</a> <% for (int i = 1; i <= totalPages; i++) { %> <a href="?page=<%= i %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= i == currentPage ? "class=\"active\"" : "class=\"page-link\"" %> ><%= i %></a> <% } %> <a href="?page=<%= Math.min(currentPage + 1, totalPages) %>&les=<%=les%>&pu=<%=pu%>&stu=<%=stu%>&id_=<%=tea_id%>" <%= currentPage == totalPages ? "class=\"disabled page-link\"" : "class=\"page-link\"" %> >下一页 »</a> </div>
标签:翻页,pu,stu,les,一页,id From: https://www.cnblogs.com/cocotun/p/17351049.html