0

我有一组多选测验形式的单选按钮,但我在使用这些按钮时遇到了一些麻烦。当我尝试单击除第一个单选按钮之外的任何其他单选按钮时,它会立即将第一个单选按钮显示为选中,并且需要 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">&nbsp;</td>
                  <td><input name="submit" type="submit" class="formmed" id="submit" value="Submit" tabindex="5"  style="width:200px;"/></td>
                </tr>
              </table>
        </form>
4

1 回答 1

3

我已经浏览了你的代码。从第一个 radio( ) 组中删除标签标签。name="environment"然后它会正常工作。

于 2012-01-25T14:19:13.297 回答