i have a one problem. please help me.
i have a javascript code but doesnt work now.
that code:
<input type="checkbox" id="konut1" name="tasinmazsecim" class="tasinmazsecim" value="489" /><span>1-100m2</span>
<span id="payment-total" style="text-decoration:underline;">0</span>
<input id="input" type="text" value="0"/>
window.onload=function(){
var inputs = document.getElementsByClassName('tasinmazsecim'),
total = document.getElementById('payment-total');
for (var i=0; i < inputs.length; i++) {
inputs[i].onchange = function() {
var add = this.value * (this.checked ? 1 : -1);
total.innerHTML = parseFloat(total.innerHTML) + add
var new_total = parseFloat(document.getElementById('input').value);
console.log(new_total);
document.getElementById('input').value=new_total + add
}
}
}
checkbox value + other checkbox value this worked.
but i need checkbox value + 0.07 tax + 50
please help me.
Aucun commentaire:
Enregistrer un commentaire