首页 > 编程语言 >2021级《JAVA语言程序设计》上机考试试题7

2021级《JAVA语言程序设计》上机考试试题7

时间:2022-12-24 21:35:08浏览次数:44  
标签:JAVA 上机 浏览 item 密码 2021 message

现在是学生查看,重置密码,原来是搜索,现在直接浏览,直接重置密码,改了下

 

代码如下:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>浏览学生信息</title>
</head>
<body>
<%
Object message = request.getAttribute("message");
if(message!=null && !"".equals(message)){

%>
<script type="text/javascript">
alert("<%=request.getAttribute("message")%>");
</script>
<%} %>
<center>
<h1>
浏览学生信息
</h1>
<form name="form" method="post" action="Manager.jsp">
<input type="submit" value="返回管理员功能页">
</form>
</center>
<div align="center">
<table align="center" border="1" width="500">
<tr>
<td>学号</td>
<td>姓名</td>
<td>性别</td>
<td>所属学院</td>
<td>所属专业</td>
<td>手机</td>
<td>职位</td>
<td>密码</td>
<td>操作</td>
</tr>
<c:forEach items="${bean}" var="item" varStatus="status">
<tr>
<td>${item.getStuID()}</td>
<td>${item.getStuName()}</td>
<td>${item.getSex()}</td>
<td>${item.getCollege()}</td>
<td>${item.getProfessionals()}</td>
<td>${item.getPhone()}</td>
<td>${item.getPosition()}</td>
<td>${item.getMima()}</td>
<td>
<form name="form" action="Servlet?method=ResetStudent&StuID=${item.getStuID()}" method="post" onsubmit="return check()">
<input type="submit" value="重置密码" />
</form>
</td>
</tr>
</c:forEach>
</table>
</div>


</body>
</html>

 

标签:JAVA,上机,浏览,item,密码,2021,message
From: https://www.cnblogs.com/JIANGzihao0222/p/17003415.html

相关文章