Bootstrap历练实例:表单控件状态(禁用的字段集fieldset)
禁用的字段集 fieldset
对 <fieldset> 添加 disabled 属性来禁用 <fieldset> 内的所有控件。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bootstrap历练实例:表单控件状态(禁用的字段集fieldset)</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
</head>
<body>
<div class="container">
<form role="form" class="form-horizontal">
<div class="form-group">
<fieldset disabled>
<label for="disabledTextinput" class="control-label col-sm-2">禁用输入:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="disabledTextinput" placeholder="禁止输入" />
</div>
</fieldset>
</div>
</form>
</div>
<script src="jQuery/jquery-2.1.4.js"></script>
<script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
</body>
</html>