<form name="form1" method="post" action="">
  <input type="checkbox" name="a" value="checkbox">
  <input type="checkbox" name="a" value="checkbox"> 
 <input type="checkbox" name="a" value="checkbox">
  <input type="checkbox" name="b" value="checkbox">
  <input type="checkbox" name="b" value="checkbox">
  <input type="checkbox" name="b" value="checkbox">
 ......
</form>
<input type=button value="alert checkbox'value" onclick=getCheckbox()>
<script>
function getCheckbox(){
for(i=0;i<form1.children.length;i++){
   if(form1.children[i].type=='checkbox')alert(form1.children[i].checked)
}
}
</script>