Commit 89671141 authored by Sander Kvenild's avatar Sander Kvenild
Browse files

Set value to 200 if checkbox is checked

parent 23663284
......@@ -67,10 +67,19 @@ let checkboxes = document.getElementsByName("check");
// TODO: Convert to loop
checkboxes[0].onchange = () => {
saldos[0].disabled = checkboxes[0].checked;
if (checkboxes[0].checked) {
saldos[0].value = 200;
}
}
checkboxes[1].onchange = () => {
saldos[1].disabled = checkboxes[1].checked;
if (checkboxes[1].checked) {
saldos[1].value = 200;
}
}
checkboxes[2].onchange = () => {
saldos[2].disabled = checkboxes[2].checked;
if (checkboxes[2].checked) {
saldos[2].value = 200;
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment