【发布时间】:2012-12-28 15:44:44
【问题描述】:
我有一个单选按钮列表。当我浏览它们时,似乎只有第一个单选按钮或被选中的单选按钮将获得焦点,其余单选按钮将被跳过。复选框没有这个问题。
我很难向我的 QA 解释这不是错误。有人可以向我解释为什么会发生这种情况。
Soccer: <input type="checkbox" name="sports" value="soccer" tabindex="1" /><br />
Football: <input type="checkbox" name="sports" value="football" tabindex="2" /><br />
<input type="radio" name="num" value="3" tabindex="3">3<br>
<input type="radio" name="num" value="4" tabindex="4">4<br>
<input type="radio" name="num" value="5" tabindex="5">5<br>
<input type="radio" name="num" value="6" tabindex="6">6<br>
<input type="radio" name="num" value="7" tabindex="7">7<br>
Baseball: <input type="checkbox" name="sports" value="baseball" tabindex="8" /><br />
Basketball: <input type="checkbox" name="sports" value="basketball" tabindex="9" />
【问题讨论】:
-
对我来说似乎是您的浏览器。你使用的是什么浏览器?你在其他浏览器上试过吗?
-
试过firefox、ie9和chrome
-
请记住,“修复”默认行为往往会导致臭名昭著的错误......聪明点……
-
对我来说,在无线电 btns 上具有(单独的)名称属性是解决方案。
标签: html radio-button