How to make a radio button unchecked by clicking it with JavaScript?

Spread the love

To make a radio button unchecked by clicking it with JavaScript, we set its checked property to false.

For instance, we write

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

to select the checkbox with getElementById.

Then we set its checked property to false to uncheck it.

Leave a Reply

Your email address will not be published. Required fields are marked *