if("确认删除"){ $num=$_POST['checkbox']; foreach($num as $v){ $ sql="delete from aa where id =".$v; $aa=mysql_query($sql); echo "location.;"; } } ?> var checkflag = "false"; function check(fieldName) { var field=document.getElementsByName(fieldName) ; if (checkflag == "false") { for (i = 0; i < field.length; i++) { field[i].checked = true; } checkflag = "true"; return "全选"; }else { for (i = 0; i field[i].checked = false; } checkflag = "false"; return "全选"; } } 复制代