I have a checkbox in a form and I\'d like it to work according to following scenario:
totalCost
function calc() { if (document.getElementById('xxx').checked) { document.getElementById('totalCost').value = 10; } else { calculate(); } }
HTML