This post will discuss how to uncheck a radio button in JavaScript and jQuery.

1. Using jQuery

The :checked CSS pseudo-class selector represents any radio (<input type="radio">) element that is checked. The idea is to use the :checked selector to identify the selected radio button and unset it.

jQuery


HTML



Edit in JSFiddle

 
Alternatively, you can use the .prop() method to unset the value of matched radio elements, as shown below:

jQuery


HTML



Edit in JSFiddle

2. Using JavaScript

In plain JavaScript, you can use the querySelector() method to return the selected radio button and set its checked property to false.

JS


HTML



Edit in JSFiddle

That’s all about unchecking a radio button in JavaScript and jQuery.