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

      2. <small id='Mfqbw'></small><noframes id='Mfqbw'>

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

        Bootstrap 单选按钮“已选中"旗帜

        Bootstrap radio button quot;checkedquot; flag(Bootstrap 单选按钮“已选中旗帜)
        <i id='2amqz'><tr id='2amqz'><dt id='2amqz'><q id='2amqz'><span id='2amqz'><b id='2amqz'><form id='2amqz'><ins id='2amqz'></ins><ul id='2amqz'></ul><sub id='2amqz'></sub></form><legend id='2amqz'></legend><bdo id='2amqz'><pre id='2amqz'><center id='2amqz'></center></pre></bdo></b><th id='2amqz'></th></span></q></dt></tr></i><div id='2amqz'><tfoot id='2amqz'></tfoot><dl id='2amqz'><fieldset id='2amqz'></fieldset></dl></div>
      3. <tfoot id='2amqz'></tfoot>
          <legend id='2amqz'><style id='2amqz'><dir id='2amqz'><q id='2amqz'></q></dir></style></legend>

                <tbody id='2amqz'></tbody>

              <small id='2amqz'></small><noframes id='2amqz'>

              • <bdo id='2amqz'></bdo><ul id='2amqz'></ul>

                  本文介绍了Bootstrap 单选按钮“已选中"旗帜的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果 #1 有效,则如果 #2 无效.检查下面的代码:

                  In case #1 works, in case #2 it do not works. Check the code bellow:

                  <div class="container">
                      <div class="row">
                          <h1>Radio Group #1</h1>
                          <label class="radio-inline">
                            <input name="radioGroup" id="radio1" value="option1" type="radio"> 1
                          </label>
                          <label class="radio-inline">
                            <input name="radioGroup" id="radio2" value="option2" checked="checked" type="radio"> 2
                          </label>
                          <label class="radio-inline">
                            <input name="radioGroup" id="radio3" value="option3" type="radio"> 3
                          </label>
                      </div>
                      <div class="row">
                          <h1>Radio Group #2</h1>
                          <label for="year" class="control-label input-group">Year</label>
                          <div class="btn-group" data-toggle="buttons">
                              <label class="btn btn-default">
                                  <input name="year" value="2011" type="radio">2011
                              </label>
                              <label class="btn btn-default">
                                  <input name="year" value="2012" type="radio">2012
                              </label>
                              <label class="btn btn-default">
                                  <input name="year" value="2013" checked="checked" type="radio">2013
                              </label>
                          </div>  
                      </div>  
                  </div>
                  

                  您可以在这里看到它的实际效果:http://bootply.com/84165

                  You can see it in action here: http://bootply.com/84165

                  推荐答案

                  假设您希望选中一个默认按钮.

                  Assuming you want a default button checked.

                  <div class="row">
                      <h1>Radio Group #2</h1>
                      <label for="year" class="control-label input-group">Year</label>
                      <div class="btn-group" data-toggle="buttons">
                          <label class="btn btn-default">
                              <input type="radio" name="year" value="2011">2011
                          </label>
                          <label class="btn btn-default">
                              <input type="radio" name="year" value="2012">2012
                          </label>
                          <label class="btn btn-default active">
                              <input type="radio" name="year" value="2013" checked="">2013
                          </label>
                      </div>
                    </div>
                  

                  active 类添加到您希望默认的按钮(label 标签),并将 checked="" 添加到它的 input 标记,因此默认以表单形式提交.

                  Add the active class to the button (label tag) you want defaulted and checked="" to its input tag so it gets submitted in the form by default.

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)
                  Is it possible to compile Coffeescript code in script tags in html files?(是否可以在 html 文件的脚本标签中编译 Coffeescript 代码?)
                  <tfoot id='WaNRP'></tfoot>
                  • <small id='WaNRP'></small><noframes id='WaNRP'>

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

                        <tbody id='WaNRP'></tbody>

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