<input type="checkbox" name="ck" value="1" />
<input type="checkbox" name="ck" value="2" />
<input type="checkbox" name="ck" value="3" />
<input type="button" onclick="getcks()" value="getcks" />
<script>
function getcks(){
  var arr=new Array();
  for (i=0;i<document.all.ck.length;i++){
    if (document.all.ck[i].checked==true){
      arr.push(document.all.ck[i].value);
    }
  }
  alert(arr);
}
</script>