update_student.jsp
来自「java 框架核心技术编程」· JSP 代码 · 共 81 行
JSP
81 行
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html:html lang="true">
<head>
<title>学生选课系统——Hibernate 多对多实现</title>
</head>
<body>
<center>
<h1>学生选课系统 —— Struts + Hibernate</h1>
<hr>
<br>
<logic:present name="student" scope="request">
<html:form action="student.do" method="post">
<table border="1" width="80%">
<tr>
<td colspan="2">
<h2>
更新学生信息
</h2>
</td>
</tr>
<tr>
<td>
姓名:
</td>
<td>
<html:text property="name" value="${student.name}"/>
</td>
</tr>
<tr>
<td>
年龄:
</td>
<td>
<html:text property="age" value="${student.age}"/>
</td>
</tr>
<tr>
<td>
性别:
</td>
<td>
<logic:equal name="student" scope="request" property="sex" value="男">
<input type="radio" name="sex" value="男" checked>
男
<input type="radio" name="sex" value="女">
女
</logic:equal>
<logic:equal name="student" scope="request" property="sex" value="女">
<input type="radio" name="sex" value="男">
男
<input type="radio" name="sex" value="女" checked>
女
</logic:equal>
</td>
</tr>
<tr>
<td colspan="2">
<input type="hidden" name="type" value="3">
<input type="hidden" name="status" value="update">
<input type="hidden" name="sid" value="${student.sid}">
<html:submit value="更新"></html:submit>
<html:reset value="重置"></html:reset>
</td>
</tr>
</table>
</html:form>
</logic:present>
<logic:notPresent name="student" scope="request">
<h2>没有任何数据!</h2>
</logic:notPresent>
</center>
</body>
</html:html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?