Pre-recorded question

Question #61
How to check / uncheck a checkbox input in pure JavaScript ?
Answer

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;



7 events in history
Question by Alphonsio 06/06/2020 at 03:55:08 PM
How to check / uncheck a radio button input in JavaScript?
Question by Alphonsio 06/06/2020 at 03:55:01 PM
How to check / uncheck a radio button input in pure JavaScript?
Question by Alphonsio 06/06/2020 at 03:54:50 PM
How to check / uncheck a radio button input in vanilla JS ?
Question by Alphonsio 06/06/2020 at 03:52:29 PM
How to check / uncheck a checkbox input in vanilla JS ?
Question by Alphonsio 06/06/2020 at 03:52:19 PM
How to check / uncheck a checkbox input in pure JavaScript ?
Answer by Alphonsio 06/06/2020 at 03:52:06 PM

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;



Question by Alphonsio 06/06/2020 at 03:49:00 PM
How to check / uncheck a checkbox input in JavaScript ?
# ID Query URL Count

Icons proudly provided by Friconix.