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 Radio Controls
<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>
Just disable the fieldset with JQuery.
Here's a working example: http://www.bootply.com/120507
来源:https://stackoverflow.com/questions/20141757/bootstrap-fieldset-enable-disable-with-radio-button