<form name="form1" action="" method="get">
<input type="checkbox" name=A id=aa value="1" checked>
<input type="checkbox" name=A id=aa value="2">
<input type="checkbox" name=A id=bb value="2">
<input type="checkbox" name=A id=bb value="2" checked><input type="button" value="重置aa" onclick="resetchk('aa')">
<input type="button" value="重置bb" onclick="resetchk('bb')">
</form>
<script>
function resetchk(id)
{
var chk = document.all[id];
for(var i=0;i<chk.length;i++)chk[i].checked=false;
}
</script>
<input type="checkbox" name=A id=aa value="1" checked>
<input type="checkbox" name=A id=aa value="2">
<input type="checkbox" name=A id=bb value="2">
<input type="checkbox" name=A id=bb value="2" checked><input type="button" value="重置aa" onclick="resetchk('aa')">
<input type="button" value="重置bb" onclick="resetchk('bb')">
</form>
<script>
function resetchk(id)
{
var chk = document.all[id];
for(var i=0;i<chk.length;i++)chk[i].checked=false;
}
</script>
<input type="checkbox" name=A id=aa value="1" checked dfck="t">
<input type="checkbox" name=A id=aa value="2" dfck="f">
<input type="checkbox" name=A id=bb value="2" dfck="f">
<input type="checkbox" name=A id=bb value="2" checked=0 dfck="t">
<input type="button" value="重置aa" onclick=resetCk("aa")>
<input type="button" value="重置bb" onclick=resetCk("bb")>
</form>
<script>
function resetCk(id)
{var o=document.getElementsByName(id);
var l=o.length;
for(var i=0;i<l;i++)
o[i].checked=o[i].dfck=="t"?1:0
}
</script>