我有多个单选按钮。随机检查或选择单选按钮值后,我需要在单击按钮时将单选按钮重置为默认选中或选择的值。我的 HTML 代码如下。
jQuery
function ResetRdo() {
// Code to reset ?
}
HTML
<table>
<tr>
<td>
<input type="radio" name="rdo1" value="a" checked="checked" />
A
<input type="radio" name="rdo1" value="b" />
B
<input type="radio" name="rdo1" value="c" />
C
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo2" value="1" />
1
<input type="radio" name="rdo2" value="2" checked="checked" />
2
<input type="radio" name="rdo2" value="3" />
3
</td>
</tr>
<tr>
<td>
<input type="radio" name="rdo3" value="1a" />
1a
<input type="radio" name="rdo3" value="2b" />
2b
<input type="radio" name="rdo3" value="3c" checked="checked" />
3c
</td>
</tr>
<tr>
<td>
<input type="button" value="Reset" onclick="ResetRdo()" />
</td>
</tr>
</table>