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

3 years ago
<%--
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>
3 weeks ago
<meta charset="UTF-8"> <!-- 设置文档字符集为UTF-8 -->
<title>我的个人信息</title> <!-- 设置网页标题 -->
<%@include file="/pages/common/header.jsp"%> <!-- 引入公共头部文件 -->
3 years ago
<style type="text/css">
h1 {
3 weeks ago
text-align: center; /* 设置h1标题文本居中对齐 */
margin-top: 200px; /* 设置h1元素的顶部外边距为200像素 */
3 years ago
}
h1 a {
3 weeks ago
color:red; /* 设置h1中的链接颜色为红色 */
3 years ago
}
input {
3 weeks ago
text-align: center; /* 设置输入框中的文本居中对齐 */
3 years ago
}
</style>
</head>
3 weeks ago
3 years ago
<body>
3 weeks ago
<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"%> <!-- 引入登录成功后显示的菜单 -->
3 years ago
</div>
3 weeks ago
<div id="main"> <!-- 主内容区域 -->
<form action="userServlet" method="post"> <!-- 表单提交到userServlet使用POST方法 -->
<input type="hidden" name="action" value="update"/> <!-- 隐藏字段,用于指示操作类型为"更新" -->
<table> <!-- 使用表格来组织输入字段 -->
3 years ago
<tr>
3 weeks ago
<td>序号</td> <!-- 表头:序号 -->
<td>用户名</td> <!-- 表头:用户名 -->
<td>密码</td> <!-- 表头:密码 -->
<td>电子邮箱</td> <!-- 表头:电子邮箱 -->
<td>收货地址</td> <!-- 表头:收货地址 -->
<td colspan="2">修改</td> <!-- 表头:修改,跨两列 -->
3 years ago
</tr>
<tr>
3 weeks ago
<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> <!-- 提交按钮,点击后提交表单 -->
3 years ago
</tr>
</table>
</form>
</div>
3 weeks ago
<%@include file="/pages/common/footer.jsp"%> <!-- 引入公共页脚文件 -->
3 years ago
</body>
</html>
3 weeks ago