<small id='cPWMe'></small><noframes id='cPWMe'>

    <bdo id='cPWMe'></bdo><ul id='cPWMe'></ul>
  • <legend id='cPWMe'><style id='cPWMe'><dir id='cPWMe'><q id='cPWMe'></q></dir></style></legend><tfoot id='cPWMe'></tfoot>

      1. <i id='cPWMe'><tr id='cPWMe'><dt id='cPWMe'><q id='cPWMe'><span id='cPWMe'><b id='cPWMe'><form id='cPWMe'><ins id='cPWMe'></ins><ul id='cPWMe'></ul><sub id='cPWMe'></sub></form><legend id='cPWMe'></legend><bdo id='cPWMe'><pre id='cPWMe'><center id='cPWMe'></center></pre></bdo></b><th id='cPWMe'></th></span></q></dt></tr></i><div id='cPWMe'><tfoot id='cPWMe'></tfoot><dl id='cPWMe'><fieldset id='cPWMe'></fieldset></dl></div>
      2. 单选按钮“选中"属性不起作用

        时间:2023-10-20

          <legend id='EHuZJ'><style id='EHuZJ'><dir id='EHuZJ'><q id='EHuZJ'></q></dir></style></legend>
        1. <small id='EHuZJ'></small><noframes id='EHuZJ'>

          <i id='EHuZJ'><tr id='EHuZJ'><dt id='EHuZJ'><q id='EHuZJ'><span id='EHuZJ'><b id='EHuZJ'><form id='EHuZJ'><ins id='EHuZJ'></ins><ul id='EHuZJ'></ul><sub id='EHuZJ'></sub></form><legend id='EHuZJ'></legend><bdo id='EHuZJ'><pre id='EHuZJ'><center id='EHuZJ'></center></pre></bdo></b><th id='EHuZJ'></th></span></q></dt></tr></i><div id='EHuZJ'><tfoot id='EHuZJ'></tfoot><dl id='EHuZJ'><fieldset id='EHuZJ'></fieldset></dl></div>
                <bdo id='EHuZJ'></bdo><ul id='EHuZJ'></ul>
                <tfoot id='EHuZJ'></tfoot>
                    <tbody id='EHuZJ'></tbody>
                  本文介绍了单选按钮“选中"属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  默认情况下,单选按钮不显示为选中.我开始时没有默认选择,做了一些非常简单的 js 验证,但它不起作用.所以我选择只使用默认值,直到我弄清楚并发现发生了一些奇怪的事情.

                  The radio button does not show up as checked by default. I started off without a default choice doing some very simple js validation and it wasn't working. So I opted to just use default values until I figured that out and discovered that something weird is going on.

                  标记是有效的,我已经在 FF、Safari 和 Chrome 中尝试过.没有任何效果.

                  The markup is valid and I've tried in FF, Safari and Chrome. Nothing works.

                  我认为这是与 jQuery 库的冲突,因为当我删除调用脚本时问题就消失了.

                  I think it's a conflict with the jQuery library because the problem goes away when I remove the call script.

                  <label>Do you want to accept American Express?</label> Yes
                  <input id="amex" style="width: 20px;" type='radio' name='Contact0_AmericanExpress' value='1' /> No
                  <input style="width: 20px;" type='radio' name='Contact0_AmericanExpress' class='check' value='0' checked="checked" />

                  推荐答案

                  如果你有多个同名的属性为 checked 属性,它将采用页面上最后一个选中的单选.

                  If you have multiple of the same name with the checked attribute it will take the last checked radio on the page.

                  <form>
                      <label>Do you want to accept American Express?</label>
                      Yes<input id="amex" style="width: 20px;" type="radio" name="Contact0_AmericanExpress"  />  
                      maybe<input id="amex" style="width: 20px;" type="radio" name="Contact0_AmericanExpress"  checked="checked" />  
                      No<input style="width: 20px;" type="radio" name="Contact0_AmericanExpress" class="check" checked="checked" />
                  </form>

                  这篇关于单选按钮“选中"属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何设置 (css) 单选按钮和标签的样式? 下一篇:使用 -webkit-backface-visibility 时,Windows Chrome 中的单选按钮背景变为白色

                  相关文章

                      <bdo id='sPVo2'></bdo><ul id='sPVo2'></ul>
                    <tfoot id='sPVo2'></tfoot>
                  1. <legend id='sPVo2'><style id='sPVo2'><dir id='sPVo2'><q id='sPVo2'></q></dir></style></legend>

                      <small id='sPVo2'></small><noframes id='sPVo2'>

                    1. <i id='sPVo2'><tr id='sPVo2'><dt id='sPVo2'><q id='sPVo2'><span id='sPVo2'><b id='sPVo2'><form id='sPVo2'><ins id='sPVo2'></ins><ul id='sPVo2'></ul><sub id='sPVo2'></sub></form><legend id='sPVo2'></legend><bdo id='sPVo2'><pre id='sPVo2'><center id='sPVo2'></center></pre></bdo></b><th id='sPVo2'></th></span></q></dt></tr></i><div id='sPVo2'><tfoot id='sPVo2'></tfoot><dl id='sPVo2'><fieldset id='sPVo2'></fieldset></dl></div>