<html> <head> <title>表</title> </head> <body> <a href="/pageResult?com=insert" >添加</a> <form action="/pageResult" method="post"> 姓名:<input type="text" name="AccountName" value="${qo.accountName}"/> 年龄:<input type="text" name="balanceMin" value="${qo.balanceMin}"/>-<input type="text" name="balanceMax" value="${qo.balanceMax}"/> <tr> <input type="submit" value="提交"> </tr> <table border="1" cellpadding="10" cellspacing="0"> <tr> <th>ID</th> <th>姓名</th> <th>年龄</th> <th>操作</th> </tr> <c:forEach items="${pageResult.data}" var="p" varStatus="vs"> <tr> <th>${p.id}</th> <th>${p.name}</th> <th>${p.balance}</th> <th> <a href="/pageResult?com=select&id=${p.id}">修改</a> <a href="/pageResult?com=delete&id=${p.id}">删除</a> </th> </tr> </c:forEach> <th> <td colspan="4"> <a href="#" onclick="gePage1(1)">首页</a> <a href="#" onclick="gePage1(${pageResult.prevPage})">上页</a> <a href="#" onclick="gePage1(${pageResult.nextPage})">下页</a> <a href="#" onclick="gePage1(${pageResult.totalPage})">尾页</a> 当前页: ${pageResult.currentPage} /${pageResult.totalPage}页 总共: ${pageResult.totalCount}数据 <input id="currentPage" onclick="gePage2()" type="number" name="currentPage" value="${pageResult.currentPage}"> 每页<select name="pageSize"> <option value="3" ${pageResult.pageSize==3 ? ‘selected‘ : ‘‘ }>3</option> <option value="5" ${pageResult.pageSize==5 ? ‘selected‘ : ‘‘ }>5</option> <option value="8" ${pageResult.pageSize==8 ? ‘selected‘ : ‘‘ }>8</option> </select> </th> </table> </form> <script> function gePage2() { document.forms[0].submit() } function gePage1(Pag) { document.getElementById("currentPage").value=Pag; document.forms[0].submit() } </script> </body> </html>
<html> <head> <title>cz</title> </head> <body> <form action="/pageResult?com=addupdate" method="post"> <input type="hidden" name="id" value="${}"/> <tr> 姓名:<input type="text" name="" value="${ }"/> 年龄:<input type="text" name="" value="${}"/> <input type="submit" value="提交"> </tr> </form> </body> </html>