【问题标题】:Bootstrap Radio buttons not working properly in firefoxBootstrap 单选按钮在 Firefox 中无法正常工作
【发布时间】:2013-02-01 16:08:11
【问题描述】:

我最近开始使用引导程序来创建网站的前端。我最初使用 chrome 来开发它。我最近开始在 Firefox 上进行测试,但遇到了一个问题。我在首页上有几个单选按钮。当我单击我想要的那个时,它看起来好像只选择了第一个而不是我正在单击的那个。如果我快速单击几次,它会正确选择。任何想法为什么会发生这种情况?代码在这里:

<form action="redirector.php" action="get">
            <fieldset>
            <table border="1">
                <tr>
                    <td valign="top"><b>Please select a genome:</b><br>
                    <label class="radio">
                <input type="radio" name ="genome" value="Acral2">Acremonium Alcalophilum<br><input type="radio" name ="genome" value="Aspni3">Aspergillus niger<br><input type="radio" name ="genome" value="Glotr1_1">Gloeophyllum trabeum<br><input type="radio" name ="genome" value="Phchr1">Phanerochaete chrysosporium<br><input type="radio" name ="genome" value="PleosPC15_2">Pleurotus ostreatus<br><input type="radio" name ="genome" value="Spoth2">Sporotrichum Thermophile<br><input type="radio" name ="genome" value="Thite2">Thielavia terrestris<br>                     </label>
                    </td>
                    <td valign="top">
                        <b>View proteins with JGI annotation of type:</b><br>
                        <label class="radio">
                            <input type="radio" name ="jgiAnnotation" value=sigPInformationView>SignalP Information<br>
                            <input type="radio" name ="jgiAnnotation" value=ecInformationView>EC and Pathway Information<br>
                            <input type="radio" name ="jgiAnnotation" value=domainInformationView>Domain Information<br>
                            <input type="radio" name ="jgiAnnotation" value=goInformationView>Go Information<br>
                        </label>
                        <button type="submit" class="btn">Submit</button>
                        </fieldset>
                        </form>
                    </td>
                    <td valign="top">
                    <form action="annotationInfoView.php" action="get">
                        <fieldset>
                        <b>View single protein:</b><br>
                        Enter our ID number:<input type="text" name ="ourId"><br>
                        (i.e. jgi_Spoth2_2293939)<br>
                        <button type="submit" class="btn">Submit</button>
                        </fieldset>
                    </form>
                    </td>
                </tr>
            </table>

http://jsfiddle.net/CTF2s/

【问题讨论】:

    标签: firefox twitter-bootstrap


    【解决方案1】:

    问题是您在一个标签内有多个单选按钮。

    如果我快速点击几次,它会正确选择。

    这可能是因为您直接单击单选按钮而不是单选按钮旁边的文本。这是所有浏览器的行为方式,包括 Chrome。

    查看Twitter Bootstrap's "Forms" documentation 的“复选框和收音机”部分以获取工作示例。

    【讨论】:

      猜你喜欢
      • 2013-11-11
      • 2013-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-20
      • 1970-01-01
      相关资源
      最近更新 更多