<div class="form-group">
<label for="IsActive" class="col-sm-2 control-label"></label>
<div class="col-md-8">
<input id="IsActive" name="IsActive" type="checkbox"> 是否启用
</div>
</div>
赋值:
if (result.IsActive == true) {
$('#IsActive')[0].checked = true;
} else {
$('#IsActive')[0].checked = false;
}
取值:
var IsActive = $('#IsActive')[0].checked;