<input type='checkbox' name='chec' id='chec' value='1000'>
<input type='checkbox' name='chec' value='100'>
<input type='checkbox' name='chec' value='10'>
<input type='checkbox' name='chec' value='1'>
<input type = "button" id = "show" value = "show me">
<script>
function getCheckboxesValues( name ) {
var x, result = "", checkboxes = document.getElementsByName( name );
for ( x = 0; x < checkboxes.length; x++ ) {
result += checkboxes[ x ].checked ? checkboxes[ x ].value : ""
}
return result
}
document.getElementById( "show" ).onclick = function() {
alert( getCheckboxesValues( "chec" ) )
}
</script>
checkbox, а не chekbox
И одинаковые id делать не стоит.