<form name="form1">
<input type=checkbox name=mm value=a onclick="cc(this)"><br>
<input type=checkbox name=mm value=b onclick="cc(this)"><br>
<input type=checkbox name=mm value=c onclick="cc(this)"><br>
<input type=checkbox name=mm value=d onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=checkbox name=mm value=e onclick="cc(this)"><br>
<input type=button value=提交 onclick="checkForm()">
</form>
<script>
var n=0;
function cc(obj)
{
if(obj.checked)
n++;
else
n--; if (n > 6)
     {
       alert("你只能选 6 个");
       obj.checked = false;
   n--;
       return;
     }
}
function checkForm()
{
if (n==0){
alert("请选择一项!");
return false;
}
else
document.all("form1").submit();
}
</script>
快给点分来吧