fill checkbox javascript
snippet in javascript

javascript check uncheck checkbox

user6358

document.getElementById("myCheckBoxID").checked = true; // Check
document.getElementById("myCheckBoxID").checked = false;// Uncheck

fill checkbox javascript

user8385

// Check
document.getElementById("checkbox").checked = true;

// Uncheck
document.getElementById("checkbox").checked = false;

how to check if input is checked javascript

user9723


        
            
        
     const cb = document.getElementById('accept');
console.log(cb.checked);