2020 12 11

员工培训系统:

修改部门界面:

<%@ page language="java" contentType="text/ html; charset=UTF-8"
    pageEncoding="UTF-8" import = "java.util.*"%>
     <%@page import="bean.section"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%List<section> listsection=(List<section>)session.getAttribute("Asection");
String ID=request.getParameter("ID");
%>
<form action="sevelet?method=update&user=section" method="post" onsubmit="return chech(this)">
<table align="center" width="450" border="1">
    <tr>
        <td align="center" colspan="5">
            <h2>修改部门</h2>
            </td>
    </tr>
    <%
        for(section p:listsection){
            if(p.getSID2().equals(ID))
            {
                session.setAttribute("ID", p.getSID2());
    %>
    <tr>
        <td align="right">编号:</td>
        <td><%=p.getSID2()%></td>
    </tr>
    <tr>
        <td align="right">姓名:</td>
        <td><input type="text" value=<%=p.getSname2()%> name="name"/></td>
    </tr>
        <%    
        }
    }
    %>
    <tr>
        <td align="center" colspan="2">
            <input type="submit" value="确认">
        </td>
    </tr>
        <td><a href="user.jsp">注销</a></td>
        <td><a href="setsection1.jsp">返回上一级</a></td>
    </table>
    </form>
</body>
</html>
原文地址:https://www.cnblogs.com/fuxw4971/p/14220344.html