2013-02-01 124 views
1

我最近開始使用引導來創建網站的前端。我最初使用鉻來開發它。我最近開始測試Firefox,並遇到了一個問題。我在頭版上有幾個單選按鈕。當我點擊我想要的那個時,它看起來好像只是選擇第一個而不是我點擊的那個。如果我點擊幾次,它會正確選擇。任何想法爲什麼發生這種情況?該代碼是在這裏:引導單選按鈕在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/

回答

4

問題是你有一個單一的標籤內的多個單選按鈕。

如果我點擊幾次,它會正確選擇。

這可能是因爲您直接單擊單選按鈕而不是單選按鈕旁邊的文本。這就是所有瀏覽器的行爲方式,包括Chrome。

查看Twitter Bootstrap's "Forms" documentation的「複選框和收音機」部分的工作示例。

+0

啊謝謝,這是我的一個愚蠢的錯誤 – vman

+0

我有一個案件,我不小心忘了關閉標籤.... –