I need to test if the BootStrap radio button is checked. Here is my approach but it does not work. How could I verify if the radio button is Checked?
<script> function optChange() { if (document.getElementById("optEventType").val() == 'yes'){ /// Do something..... } } </script> <form> <div id ="optType" onchange="optChange()" class="radio"> <label><input type="radio" name="opt1" id = "opt1">Tex21 </label> <label><input type="radio" name="opt1" id = "opt2">Text2</label> </div> </form>