Answers for "checkbox js"

8

dom check a checkbox

document.getElementById("myCheck").checked = true;
Posted by: Guest on March-01-2021
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
1

commande checkbox html

<!doctype html>
<html>
  <body>
    
    <input type="checkbox">
    <input type="radio">
    
  </body>
</html>
Posted by: Guest on June-15-2020
0

how to check if input is checked javascript

const cb = document.getElementById('accept');
console.log(cb.checked);
Posted by: Guest on July-17-2020

Browse Popular Code Answers by Language