Answers for "javascript checkbox oncheck"

11

javascript check uncheck checkbox

document.getElementById("myCheckBoxID").checked = true; // Check
document.getElementById("myCheckBoxID").checked = false;// Uncheck
Posted by: Guest on August-02-2019
0

oncheck checkbox javascript

<input type='checkbox' onchange='handleChange(this);'> Checkbox

function handleChange(checkbox) {
    if(checkbox.checked == true){
        document.getElementById("submit").removeAttribute("disabled");
    }else{
        document.getElementById("submit").setAttribute("disabled", "disabled");
   }
}
Posted by: Guest on June-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language