简体   繁体   中英

Radio button staying checked even after I check a different one?

I have radio buttons in a piece of HTML like

<form id="speed-form">
  <table class="table-condensed table-responsive">
      <tr>
          <td><input type="radio" name="speed" value="slow"></td>
          <td align="left">Slow</td>
       </tr>
      <tr>
          <td><input type="radio" name="speed" value="medium" checked="checked"></td>
          <td align="left">Medium</td>
      </tr>   
      <tr>
         <td><input type="radio" name="speed" value="fast" /></td>
         <td align="left">Fast</td>
      </tr>
  </table>
</form> 

and the value of the currently checked input is meant to control my Javascript game. I get that value with

SG.startNew($('#speed-form input[type="radio"]:checked').val()); 

The problem is that while I have the medium one selected on page load, it doesn't seem to unselect when I click either of the other 2.

Proof: Click here

You have some sort of modal or popover blocking the input buttons.

在此处输入图片说明

After selecting and deleting it, I was able to select the radio buttons.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM