日期:2014-05-20  浏览次数:20680 次

批量删除不了呢!求解求解!!!
jsp页面
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工管理信息</title>
<style type="text/css">
<!--
.STYLE2 {font-size: 36px}
-->
</style>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function(){

$("#fanhui").click(function(){
window.location.href= "../show.jsp";
});
$("#add").click(function(){
window.location.href= "add.jsp";
});
$("#update").click(function(){
window.location.href= "mod.jsp";
});
$("#del").click(function(){
window.location.href= "del.action";
});
$("#select").click(function(){
window.location.href= "sel.jsp";
});

$(document).ready(function() { 
$("tr:odd").css({background: "#cccccc"}); 
$("tr:even").css({background: "#FFFFFF"}); 
});
 
$("#delAll").click(function(){
var str="";
var sel=document.getElementsByName("check"); //获取checkbox的值
for( var i=0;i<sel.length;i++)

if(sel[i].checked==true){
if(str == "")
str += sel[i].value;
else
str += ","+sel[i].value;

if(window.confirm("确定删除吗?")){
window.location.href= "delAll.action?id="+str;
}
}
alert(str);
if(str==""){
alert("请至少选择一条记录");
return false;
}

}); 



});






</script>
</head>
<body>
<center>
  <table width="830" height="139" border="1">
  <tr>
  <td height="52" colspan="10"><div class="STYLE2">员工管理信息</div></td>
  </tr>
  <tr>
  <td width="63">&nbsp;</td>
  <td width="64" height="36"><strong>员工ID</strong></td>
  <td width="69"><strong>员工姓名</strong></td>
  <td width="74"><strong>员工密码</strong></td>
  <td width="74"><strong>员工性别</strong></td>
  <td width="77"><strong>员工电话</strong></td>
  <td width="74"><strong>员工地址</strong></td>
  <td width="72"><strong>出生日期</strong></td>
  <td width="74"><strong>员工简介</strong></td>
  <td width="83"><div align="center"><strong>操作</strong></div></td>
  </tr>
  <s:iterator value="list" >
<tr>
<td align="right"><input type="checkbox" name="check" value=<s:property value="id"/> ></td>
<td><s:property value="id"/></td>