Bootstrap:使用单选按钮启用/禁用Fieldset

use*_*055 2 html fieldset twitter-bootstrap

我目前正在使用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>
Run Code Online (Sandbox Code Playgroud)

Sea*_*ean 5

只需使用JQuery禁用字段集.

这是一个有效的例子:http: //www.bootply.com/120507