<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>My JSP 'list.jsp' starting page</title> <link rel="stylesheet" href="<%=request.getContextPath() %>/css/index2.css" type="text/css"></link> <script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.2.min.js"></script> <script type="text/javascript"> //分页 function fenye(current){ $("#current").val(current); $("#myfrom").submit(); } </script> <title>列表展示</title> </head> <body> <form action="<%=request.getContextPath() %>/userlist" method="post" id="myfrom"> <input type="hidden" id="current" name="current" value="${page.size}"> <input type="text" name="mohu" /> <input type="submit" value="查询" /> </form> <table> <tr> <td>jsp模板</td> <td> <a href="toadd">添加</a> </td> </tr> <c:forEach items="${page.list}" var="c" > <tr> <td>${c.模板}</td> <td> <a href="delete?id=${c.id}">删除</a> <a href="toupdate?id=${c.id}">修改</a> </td> </tr> </c:forEach> <tr> <td colspan="11"> <input type="button" value="首页" onclick="fenye(1)"/> <input type="button" value="上一页" onclick="fenye(${page.prePage})"/> <input type="button" value="下一页" onclick="fenye(${page.nextPage})"/> <input type="button" value="末页" onclick="fenye(${page.lastPage})"/> </td> </tr> </table> </body> </html>
jsp模板源码
猜你喜欢
转载自www.cnblogs.com/bandu/p/9630229.html
今日推荐
周排行