You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BookStore/web/pages/user/userinfo.jsp

66 lines
2.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/9
Time: 19:51
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"> <!-- 设置文档字符集为UTF-8 -->
<title>我的个人信息</title> <!-- 设置网页标题 -->
<%@include file="/pages/common/header.jsp"%> <!-- 引入公共头部文件 -->
<style type="text/css">
h1 {
text-align: center; /* 设置h1标题文本居中对齐 */
margin-top: 200px; /* 设置h1元素的顶部外边距为200像素 */
}
h1 a {
color:red; /* 设置h1中的链接颜色为红色 */
}
input {
text-align: center; /* 设置输入框中的文本居中对齐 */
}
</style>
</head>
<body>
<div id="header"> <!-- 页头部分 -->
<img class="logo_img" alt="" src="static/img/logo1.jpg"> <!-- 网站logo图像 -->
<span class="wel_word">个人信息</span> <!-- 显示欢迎词,标识为"个人信息" -->
<%@include file="/pages/common/login_success_menu.jsp"%> <!-- 引入登录成功后显示的菜单 -->
</div>
<div id="main"> <!-- 主内容区域 -->
<form action="userServlet" method="post"> <!-- 表单提交到userServlet使用POST方法 -->
<input type="hidden" name="action" value="update"/> <!-- 隐藏字段,用于指示操作类型为"更新" -->
<table> <!-- 使用表格来组织输入字段 -->
<tr>
<td>序号</td> <!-- 表头:序号 -->
<td>用户名</td> <!-- 表头:用户名 -->
<td>密码</td> <!-- 表头:密码 -->
<td>电子邮箱</td> <!-- 表头:电子邮箱 -->
<td>收货地址</td> <!-- 表头:收货地址 -->
<td colspan="2">修改</td> <!-- 表头:修改,跨两列 -->
</tr>
<tr>
<td><input name="id" type="text" value="${sessionScope.user.id}"/></td> <!-- 用户ID输入框默认值来自会话 -->
<td><input name="username" type="text" value="${sessionScope.user.username}"/></td> <!-- 用户名输入框,默认值来自会话 -->
<td><input name="password" type="text" value="${sessionScope.user.password}"/></td> <!-- 密码输入框,默认值来自会话 -->
<td><input name="email" type="text" value="${sessionScope.user.email}"/></td> <!-- 电子邮箱输入框,默认值来自会话 -->
<td><input name="address" type="text" value="${sessionScope.user.address}"/></td> <!-- 收货地址输入框,默认值来自会话 -->
<td><input type="submit" value="提交"/></td> <!-- 提交按钮,点击后提交表单 -->
</tr>
</table>
</form>
</div>
<%@include file="/pages/common/footer.jsp"%> <!-- 引入公共页脚文件 -->
</body>
</html>