【发布时间】:2012-02-18 17:00:10
【问题描述】:
我在多项选择测验表单中有一组单选按钮,但我在使用这些按钮时遇到了一些问题。 当我尝试单击除第一个单选按钮之外的任何其他单选按钮时,它会立即将第一个单选按钮显示为选中状态,并且需要 3-4 次尝试才能最终标记所需的按钮。如果你想测试,这是我的代码:
<form action="<?php echo $editFormAction; ?>" method="post" name="form" target="_self" id="form1">
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="greentitle">Question 1</td>
<td>
<label>
<input type="radio" name="environment" value="1" />1
<input type="radio" name="environment" value="2" />2
<input type="radio" name="environment" value="3" />3
<input type="radio" name="environment" value="4" />4
<input type="radio" name="environment" value="5" />5
</label>
</td>
</tr>
<tr>
<td class="greentitle">Question 2</td>
<td>
<input name="speed" type="radio" value="1" />1
<input name="speed" type="radio" value="2" />2
<input name="speed" type="radio" value="3" />3
<input name="speed" type="radio" value="4" />4
<input name="speed" type="radio" value="5" />5
</td>
</tr>
<tr>
<td class="greentitle">Question 3</td>
<td>
<input name="quality" type="radio" value="1" />1
<input name="quality" type="radio" value="2" />2
<input name="quality" type="radio" value="3" />3
<input name="quality" type="radio" value="4" />4
<input name="quality" type="radio" value="5" />5
</td>
</tr>
<tr>
<td class="darkgrey"> </td>
<td><input name="submit" type="submit" class="formmed" id="submit" value="Submit" tabindex="5" style="width:200px;"/></td>
</tr>
</table>
</form>
【问题讨论】:
-
对我来说很好:jsfiddle.net/uQEfF
-
可能是因为第一组单选按钮在
标签: php html radio-button radio-group