<i id='d3n5R'><tr id='d3n5R'><dt id='d3n5R'><q id='d3n5R'><span id='d3n5R'><b id='d3n5R'><form id='d3n5R'><ins id='d3n5R'></ins><ul id='d3n5R'></ul><sub id='d3n5R'></sub></form><legend id='d3n5R'></legend><bdo id='d3n5R'><pre id='d3n5R'><center id='d3n5R'></center></pre></bdo></b><th id='d3n5R'></th></span></q></dt></tr></i><div id='d3n5R'><tfoot id='d3n5R'></tfoot><dl id='d3n5R'><fieldset id='d3n5R'></fieldset></dl></div>
  • <small id='d3n5R'></small><noframes id='d3n5R'>

        <bdo id='d3n5R'></bdo><ul id='d3n5R'></ul>
    1. <tfoot id='d3n5R'></tfoot>

      1. <legend id='d3n5R'><style id='d3n5R'><dir id='d3n5R'><q id='d3n5R'></q></dir></style></legend>

        默认情况下如何选择单选按钮?

        时间:2023-10-21
          <bdo id='DZWUD'></bdo><ul id='DZWUD'></ul>

        • <tfoot id='DZWUD'></tfoot>

            <tbody id='DZWUD'></tbody>

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

          <i id='DZWUD'><tr id='DZWUD'><dt id='DZWUD'><q id='DZWUD'><span id='DZWUD'><b id='DZWUD'><form id='DZWUD'><ins id='DZWUD'></ins><ul id='DZWUD'></ul><sub id='DZWUD'></sub></form><legend id='DZWUD'></legend><bdo id='DZWUD'><pre id='DZWUD'><center id='DZWUD'></center></pre></bdo></b><th id='DZWUD'></th></span></q></dt></tr></i><div id='DZWUD'><tfoot id='DZWUD'></tfoot><dl id='DZWUD'><fieldset id='DZWUD'></fieldset></dl></div>
        • <legend id='DZWUD'><style id='DZWUD'><dir id='DZWUD'><q id='DZWUD'></q></dir></style></legend>

                • 本文介绍了默认情况下如何选择单选按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一些单选按钮,我希望在加载页面时将其中一个设置为默认选中.我该怎么做?

                  I have some radio buttons and I want one of them to be set as selected by default when the page is loaded. How can I do that?

                  <input type="radio" name="imgsel"  value=""  /> 
                  

                  推荐答案

                  XHTML 解决方案:

                  XHTML solution:

                  <input type="radio" name="imgsel" value="" checked="checked" />
                  

                  请注意,checked 属性的实际值并不重要;这只是分配 "checked" 的约定.最重要的是,像 "true""false" 这样的字符串没有任何特殊含义.

                  Please note, that the actual value of checked attribute does not actually matter; it's just a convention to assign "checked". Most importantly, strings like "true" or "false" don't have any special meaning.

                  如果您的目标不是 XHTML 一致性,您可以将代码简化为:

                  If you don't aim for XHTML conformance, you can simplify the code to:

                  <input type="radio" name="imgsel" value="" checked>
                  

                  这篇关于默认情况下如何选择单选按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:div上的标签索引 下一篇:如何通过单击取消选中单选按钮?

                  相关文章

                  <tfoot id='mUxWZ'></tfoot>
                • <small id='mUxWZ'></small><noframes id='mUxWZ'>

                    1. <legend id='mUxWZ'><style id='mUxWZ'><dir id='mUxWZ'><q id='mUxWZ'></q></dir></style></legend>
                      • <bdo id='mUxWZ'></bdo><ul id='mUxWZ'></ul>

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