<%--
Created by IntelliJ IDEA.
User: 王磊
Date: 2023/5/13
Time: 10:07
To change this template use File | Settings | File Templates.
--%>
<%@ page import="shiyan.student" %>
<%@ page import="shiyan.AllMethods" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<title>添加学生信息</title>
<style>
form {
width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #f5f5f5;
border-radius: 10px;
}
label {
display: block;
margin-bottom: 10px;
font-size: 1.2em;
font-weight: bold;
}
input[type="text"],
select {
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
font-size: 1.1em;
margin-bottom: 20px;
box-sizing: border-box;
}
.btn {
display: block;
width: 100%;
max-width: 150px;
padding: 10px 20px;
margin: 0 auto;
border: none;
border-radius: 5px;
background-color: #4169E1;
color: #fff;
font-size: 1.1em;
cursor: pointer;
}
.btn:hover {
background-color: #1E90FF;
}
</style>
</head>
<body>
<%
String id = request.getParameter("id");
AllMethods allMethods=new AllMethods();
student oneStudent= allMethods.OneStudent(Integer.parseInt(id));
%>
<form action="editsave.jsp" method="post">
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required value="<%=oneStudent.name%>">
<label for="gender">性别:</label>
<select id="gender" name="gender">
<option value="男" selected>男</option>
<option value="女">女</option>
</select>
<label for="birthday">生日:</label>
<input type="date" id="birthday" name="birthday" max="2030-01-01" required value="<%=oneStudent.birthday%>">
<input type="hidden" name="id" value="<%=oneStudent.id%>">
<button type="submit" class="btn">修改</button>
</form>
</body>
</html>