87,994
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*,cn.edu.hezeu.jsp.pojo.*,java.text.*,cn.edu.hezeu.jsp.service.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'main.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script src="js/jquery.js"></script>
<script type="text/javascript">
function del(){
var del=confirm("您确定要删除此条记录?");
if(del==true){
}else{
return;
}
}
</script>
</head>
<body>
所有学生的信息如下:
<%List<Student> students=(List<Student>)request.getAttribute("stuList"); %>
<table border="1">
<tr>
<th>序号</th>
<th>学号</th>
<th>密码</th>
<th>真实姓名</th>
<th>操作</th>
</tr>
<%for(Student stu:students){ %>
<tr>
<td id="id"><%=stu.getId() %></td>
<td><%=stu.getUsername() %></td>
<td><%=stu.getPassword() %></td>
<td><%=stu.getRealname() %></td>
<td>
<button name="edit" onclick="location.href='StudentManager?id=<%=stu.getId() %>&operator=edit'">修改</button>
<button name="delete" class="buttondelete" onclick="del();location.href='StudentManager?id=document.getElementById("id").value() & operator=delete'">删除</button>
</td>
</tr>
<%} %>
<tr>
<td colspan="5"><a href="regist.jsp">增加</a></td>
</tr>
</table>
</body>
</html>
<%@ page language="java" import="java.util.*,cn.edu.hezeu.jsp.pojo.*,java.text.*,cn.edu.hezeu.jsp.service.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'main.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script src="js/jquery.js"></script>
<script type="text/javascript">
function del(){
return confirm("您确定要删除此条记录?");
}
</script>
</head>
<body>
所有学生的信息如下:
<%List<Student> students=(List<Student>)request.getAttribute("stuList"); %>
<table border="1">
<tr>
<th>序号</th>
<th>学号</th>
<th>密码</th>
<th>真实姓名</th>
<th>操作</th>
</tr>
<%for(Student stu:students){ %>
<tr>
<td id="id"><%=stu.getId() %></td>
<td><%=stu.getUsername() %></td>
<td><%=stu.getPassword() %></td>
<td><%=stu.getRealname() %></td>
<td>
<button name="edit" onclick="location.href='StudentManager?id=<%=stu.getId() %>&operator=edit'">修改</button>
<button name="delete" class="buttondelete" onclick="if(del()) location.href='StudentManager?id=<%=stu.getId() %>&operator=delete'">删除</button>
</td>
</tr>
<%} %>
<tr>
<td colspan="5"><a href="regist.jsp">增加</a></td>
</tr>
</table>
</body>
</html>