<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@include file="../taglib/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body {
line-height: 145%;
color: #333333;
text-decoration: none;
font-size: 12px;
}
</style>
<link href="style/style_club.css" rel="stylesheet" type="text/css" />
<script language = "javascript" type="text/javascript">
function mm()
{
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox")
a[i].checked = true;
}
function nn()
{
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++)
{
if (a[i].type == "checkbox") {
if(a[i].checked){
a[i].checked = false;
}
else{
a[i].checked = true;
}
}
}
}
</script>
</head>
<body>
<center>
<c:if test="${requestScope.size > 0 }">
<form action="user.do?method=delete" method="post" />
<table>
<tr>
<th> </th>
<th>用户名</th>
<th>密码</th>
</tr>
<c:forEach var="user" items="${requestScope.list }">
<tr>
<c:if test="${user.id == 1}">
<td> </td>
</c:if>
<c:if test="${user.id != 1}">
<td><input type="checkbox" name="ids" value="${user.id }"/></td>
</c:if>
<td>${user.name }</td>
<td>${user.pwd }</td>
</tr>
</c:forEach>
<tr>
<td colspan="3"><input name="submit" type="submit" value="删除"/> <input name="reset" type="reset" value="取消"/>
<a href="#" οnclick="mm();">全选</a>
<a href="#" οnclick="nn();">反选</a>
</td>
</tr>
<tr>
<td colspan="3"><font color="red">${requestScope.delete }</font></td>
</tr>
</table>
</form>
</c:if>
<c:if test="${requestScope.size < 1 }">
<c:out value="对不起,用户表为空!"></c:out>
</c:if>
</center>
</body>
</html>
xuanquanxianshi
最新推荐文章于 2022-02-25 23:47:59 发布