checkbox复选框判断选中了几个
<script language="javascript">
function test(countall) {
var eles=document.getElementsByName('tea');
var j=0;
for (var i=0;i<eles.length;i++){
if(eles[i].checked) j++;
}
if (j!=countall*2){
alert('请选择'+countall*2+'个教师来监考');
return false;
}
return true;
}
</script>