Firefox Radio Button Weirdness

后端 未结 2 2096
刺人心
刺人心 2021-02-13 22:19

I have a form with a lot of groups of radios. Each radio has a unique id and has the same name as the others in its group. The page validates as XHTML transitional.

Te

相关标签:
2条回答
  • 2021-02-13 22:49

    Doh! My designer had a single tag wrapping each group of radios. Eliminating the label tag fixes FireFox's weirdness.

    0 讨论(0)
  • 2021-02-13 22:50

    It's indeed the surrounding <label> tag that causes the Firefox issue (although it is valid html). This should do the trick:

    <input type="radio" name="upAndDown_2" id="upAndDown_21" value="Y"/><label for="upAndDown_21">Y</label><br/>
    <input type="radio" name="upAndDown_2" id="upAndDown_22" value="N"/><label for="upAndDown_22">N</label><br/>
    <input type="radio" name="upAndDown_2" id="upAndDown_23" value="NA" checked="checked"/><label for="upAndDown_22">NA</label>
    
    0 讨论(0)
提交回复
热议问题