JSFiddle - React, Tailwind, and code Playground
by pj_js15
HTML
<input type="radio" name="group1" id="a2"/>A2
<br/>
<input type="radio" name="group1" id="not"/>Not A2
<br/>
<button onclick="getConfirmation();">Confirm</button>
JavaScript
function getConfirmation() {
var retVal = confirm("Your Level of Entry is A2, is this correct?");
if (retVal) {
alert("Your Level of Entry is A2!");
return true;
} else {
document.getElementById("not").checked = true;
return false;
}
}