👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
How to check / uncheck a checkbox input in JavaScript ?

To check or uncheck a checkbox or a radio button, use the checked property:


To check:

document.getElementById("myCheckbox").checked = true;
To uncheck:

document.getElementById("myCheckbox").checked = false;



More