How to check / uncheck a radio button input in vanilla JS ?
To check or uncheck a checkbox or a radio button, use the checked
property of the concerned element by assigning a boolean value (true
or false
) :
To check:
To uncheck:document.getElementById("myCheckbox").checked = true;
document.getElementById("myCheckbox").checked = false;
To check or uncheck a checkbox or a radio button, use the checked
property of the concerned element by assigning a boolean value (true
or false
) :
To check:
To uncheck:document.getElementById("myCheckbox").checked = true;
document.getElementById("myCheckbox").checked = false;
To check or uncheck a checkbox or a radio button, use the checked
property:
To check:
To uncheck:document.getElementById("myCheckbox").checked = true;
document.getElementById("myCheckbox").checked = false;
To check or uncheck a checkbox or a radio button, use the checked
property:
To check:
To uncheck:document.getElementById("myCheckbox").checked = true;
document.getElementById("myCheckbox").checked = false;
# | ID | Query | URL | Count |
---|