【问题标题】:Bootstrap: Fieldset enable/disable with radio buttonBootstrap:使用单选按钮启用/禁用字段集
【发布时间】:2014-03-10 20:38:44
【问题描述】:

我目前正在使用 Bootstrap 3。从 bootstrap 文档中,我发现 fieldset 可以启用和禁用表单字段。那么,如何使用无线电控件打开和关闭?

HTML 无线电控件

<form>
  <div class="form-inline">
    <label for="inputPassword" class="col-sm-6  control-label content_label" 
            style="margin-right:20px"> Do you want to change password ? </label>
    <div class="radio">
      <label>
        <input type="radio" name="optionsRadios" id="optionsRadios1" 
                value="option1" >
          Yes
      </label>
    </div>
    <div class="radio" style="margin-left:10px;">
      <label>
        <input type="radio" name="optionsRadios" id="optionsRadios2" 
              value="option2" checked>
              No
      </label>
    </div>
  </div>
</form>

【问题讨论】:

    标签: html twitter-bootstrap fieldset


    【解决方案1】:

    只需使用 JQuery 禁用字段集。

    这是一个工作示例: http://www.bootply.com/120507

    【讨论】:

      猜你喜欢
      • 2012-10-17
      • 2012-10-25
      • 2011-08-27
      • 2018-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-29
      • 1970-01-01
      相关资源
      最近更新 更多