<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; " />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
function check_all()
{
var check_list = document.getElementsByName("Bton[]");
for(var i = 0; i < check_list.length; i++)
{
check_list[i].checked = true;
}
//return false;
}
function check_none()
{
var check_list = document.getElementsByName("Bton[]");
for(var i = 0; i < check_list.length; i++)
{
check_list[i].checked = false;
}
}
</script>
</head>
<body>
<form name="form1">
<?php
for($i=0;$i<10;$i++){?>
<tr><td>
<input type=checkbox name=Bton[]>
<br>
</tr></td>
<?php } ?>
<input type="button" name="b1" id="b1" value="全选" οnclick="check_all()"/>
<input type="button" name="b2" id="b2" value="全不选" οnclick="check_none()"/>
</from>
</body>
</html>
++++++++++++++++++++++++++++++
用下面的方法来处理获取的复选框的值
for($i=0;$i<count($_POST["Bton"]);$i++)//循环输出复选框的值
{
$a=$_POST["Bton"][$i];
echo $a;
}