funny - after posting that I came up with something quite similar to version 2...
Code:
<body>
hi:<input type="checkbox" value="hi"/><br>
bye:<input type="checkbox" value="bye"/><br>
later:<input type="checkbox" value="later"/><br>
<input type="button" id="butt" value="show me"/>
<script type = "text/javascript">
(function(){
var arr=[];
document.body.onclick = function(e){
var x = (e && e.target) || (window.event && event.srcElement);
if(x.type=="checkbox"){
if(x.checked){
arr.push(x.value);
} else{
for (var a = 0; a < arr.length; a++) {
if (arr[a]==x.value){
arr.splice(a,1);
break;
}
}
}
}
}
function showMe(){
alert(arr.toString().replace(/,/g,'\n'))
}
document.getElementById("butt").onclick=showMe;
}) ();
</script>
</body>