Código:
<script>
var total=0;
function sumar(chk,valor) {
if (chk.checked)
total+=valor;
document.formulario.total.value=total;
}
function restar(chk,valor) {
if (chk.checked)
total-=valor;
document.formulario.total.value=total;
}
</script>
<input name="checkbox" type="checkbox" onClick="if (this.checked) sumar(this,3); else restar(this,3)" value="checkbox">
Lo tengo asi y no rula !! Probe tambien haciendolo asi:
function restar(chk,valor) {
if (chk.checked)
total=total-valor; // Ya que son mas checkbox y deberia restarle la cantidad al total...