all*_*sef 18 html javascript checkbox jquery twitter-bootstrap
有没有办法在使用Bootstrap和Jquery禁用复选框后禁用复选框标签并将其灰显?
<div class="checkbox">
<input id="accept" name="accept" type="checkbox" value="True">
<label for="accept" class="control-label">Incremental</label>
</div>
Run Code Online (Sandbox Code Playgroud)
我现在使用波纹管代码禁用复选框:
$("#accept").prop("disabled", true);
Run Code Online (Sandbox Code Playgroud)
Tus*_*har 22
你可以做到这一点CSS只
$("#accept").prop("disabled", true);Run Code Online (Sandbox Code Playgroud)
阅读http://css-tricks.com/almanac/selectors/c/checked/