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
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.