How to get HTML radio type input value
#Method 1
<label for="male">
<input type="radio" value="1" name="gender" id="male"> Male
</label>
<label for="female">
<input type="radio" value="0" name="gender" id="female"> Female
</label>
// change it as per your requirements
var nameAttribute=`gender`;
// selected radio value
document.querySelector(`input[name='${nameAttribute}']:checked`).value;
#Method 2
// your form element
var form = document.getElementById("formId");
// based on name attribute
var gender = form.gender.value; // returns selected option
// if name = "choice"
var choice = form.choice.value; // returns selected option