引导程序:使用单选按钮启用/禁用字段集 [英] Bootstrap: Fieldset enable/disable with radio button

查看:50
本文介绍了引导程序:使用单选按钮启用/禁用字段集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用Bootstrap3.从Bootstrap文档中,我发现fieldset可以启用和禁用form字段.那么,如何使用无线电控件打开和关闭?

I'm currently using Bootstrap 3. From bootstrap documentation, I found that fieldset can enable and disable the form field. So, how can I Turn On and Off with the radio controls?

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>

推荐答案

只需使用JQuery禁用字段集.

Just disable the fieldset with JQuery.

这是一个可行的示例: http://www.bootply.com/120507

Here's a working example: http://www.bootply.com/120507

这篇关于引导程序:使用单选按钮启用/禁用字段集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆