title: How know if BootStrap Radio Button is Checked?
body: <p>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?</p>
  
  <pre><code>&lt;script&gt;
      function optChange() {
            if (document.getElementById("optEventType").val() == 'yes'){
              /// Do something.....
             }
      }
  &lt;/script&gt;
  
  &lt;form&gt;
     &lt;div id ="optType" onchange="optChange()" class="radio"&gt;
          &lt;label&gt;&lt;input type="radio" name="opt1" id = "opt1"&gt;Tex21 &lt;/label&gt;
          &lt;label&gt;&lt;input type="radio" name="opt1" id = "opt2"&gt;Text2&lt;/label&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>