<div id="checks">
<input type="checkbox" value="1000">
<input type="checkbox" value="100">
<input type="checkbox" value="10">
<input type="checkbox" value="1">
</div>
<script>
document.getElementById('checks').onclick = function()
{
var chec = document.getElementById('checks').getElementsByTagName('input');
var sum = 0;
for(i=0;i<chec.length;i++)
{
if(chec[i].checked)
{
sum += (chec[i].value*1);
}
}
alert(sum);
}
</script>