<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>添加用户</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
color: #333;
margin-top: 50px;
}
form {
width: 500px;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 5px 10px #999;
}
label {
display: block;
margin-bottom: 10px;
color: #333;
font-weight: bold;
}
input[type="text"], input[type="email"], select {
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
margin-bottom: 20px;
box-sizing: border-box;
font-size: 16px;
color: #333;
background-color: #f2f2f2;
}
input[type="submit"] {
background-color: #333;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 20px;
}
input[type="submit"]:hover {
background-color: #444;
}
a{
text-decoration: none;
font-size: 20px;
color: #3bc9e2;
}
</style>
</head>
<body>
<h1>添加学生</h1>
<form action="control_root.jsp?" method="post" enctype="multipart/form-data">
<input type="hidden" value="Add_user" name="To">
<input type="hidden" value="student" name="identity">
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required>
<label for="phone">手机号:</label>
<input type="text" id="phone" name="phone" required>
<label for="classroom">班级:</label>
<input type="text" id="classroom" name="class" required>
<label for="gender">性别:</label>
<select id="gender" name="sex" required>
<option value="" hidden>请选择</option>
<option value="男">男</option>
<option value="女">女</option>
</select>
<label for="age">入学年份:</label>
<select id="age" name="grade" required>
<option value="" hidden>请选择</option>
<%for(int i=2022;i>=2020;i--){%>
<option value=<%=i%>><%=i%>年</option>
<%}%>
</select>
<label for="major">专业:</label>
<select id="major" name="major" required>
<option value="" hidden>请选择</option>
<option value="软将工程">软件工程</option>
<option value="计算机科学与技术">计算机科学与技术</option>
</select>
<label for="faculty">院系:</label>
<select id="faculty" name="faculty" required>
<option value="" hidden>请选择</option>
<option value="信息科学与技术">信息科学与技术</option>
</select>
<input type="submit" value="添加学生" style="margin-right: 15%">
<input type="file" name="imgFile" accept="image/png">
</form>
</body>
</html>