1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <!DOCTYPE html> <html lang="ch"> <head> <meta charset="UTF-8"> <title>部门列表</title> <script> function del(deptno){ if(window.confirm('请确认是否删除!')){ document.location.href='${pageContext.request.contextPath}/delete?deptno='+deptno; } } </script> </head> <body> <h3>欢迎${userName}</h3><br> <a href="${pageContext.request.contextPath}/logout">[退出系统]</a> <a href="${pageContext.request.contextPath}/freeLogin">[退出免登陆状态]</a> <h1 align="center">部门列表</h1> <hr> <table border="1px" align="center" width="50%"> <tr> <th>序号</th> <th>部门编号</th> <th>部门名称</th> <th>操作</th> </tr> <c:forEach items="${deptList}" varStatus="varStatus" var="dept"> <tr> <td>${varStatus.count}</td> <td>${dept.deptno}</td> <td>${dept.dname}</td> <td> <a href="javascript:void(0)" onclick="del(${dept.deptno})">删除</a> <a href="${pageContext.request.contextPath}/detail?f=m&deptno=${dept.deptno}">修改</a> <a href="${pageContext.request.contextPath}/detail?f=d&deptno=${dept.deptno}">详情</a> </td> </tr> </c:forEach> </table> <hr> <a href="${pageContext.request.contextPath}/add.jsp">新增部门</a><br> <a href="${pageContext.request.contextPath}/index.jsp">回到起始页</a> </body> </html>
|