Наговнокодил побыстрому
пойдет?
<span>100$</span><input type="checkbox" onclick="sumUp();" /><br />
<span>210$</span><input type="checkbox" onclick="sumUp();" /><br />
<span>120$</span><input type="checkbox" onclick="sumUp();" /><hr />
<span id="result">0</span>$
<script type='text/javascript'>
var checkboxes = document.getElementsByTagName('input');
function sumUp() {
var sum=0;
for (var k in checkboxes) {
var checkbox = checkboxes[k];
if(checkbox.type=='checkbox') {
checkbox.checked==1 ? sum += parseInt(checkbox.previousSibling.innerHTML) : sum;
}
}
document.getElementById('result').innerHTML = sum;
}
</script>