<input name="all" type="checkbox" onclick="baoall()"><font size="2">全选</font><br>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()><script language="javascript">
function baoall(){
var all=document.all.all.checked;
var inputs=document.getElementsByTagName("INPUT");
for (var i=0;i<inputs.length;i++){
if (inputs[i].type=="checkbox" && all==true){
inputs[i].checked=true;
inputs[i].style.background="black"
}else{
inputs[i].checked=false;
inputs[i].style.background=""
}
}
}
function woyingjie(){
var n=0;
for (i=0;i<document.all.m.length;i++) {
document.all.m[i].checked==true?n++:'';
}
document.all.all.checked=n==6;
}
</script>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()>
<input name="m" type="checkbox" onclick=woyingjie()><script language="javascript">
function baoall(){
var all=document.all.all.checked;
var inputs=document.getElementsByTagName("INPUT");
for (var i=0;i<inputs.length;i++){
if (inputs[i].type=="checkbox" && all==true){
inputs[i].checked=true;
inputs[i].style.background="black"
}else{
inputs[i].checked=false;
inputs[i].style.background=""
}
}
}
function woyingjie(){
var n=0;
for (i=0;i<document.all.m.length;i++) {
document.all.m[i].checked==true?n++:'';
}
document.all.all.checked=n==6;
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货