这是jqgrid cheack box但我不会在点击提交按钮时取值,请任何人帮帮我..
edittype:'custom',
editoptions: {
custom_element: function() {
var elemStr = '<div class="col-xs-3">'+
'<label>'+
' <input type="checkbox" class="ace ace-switch ace-switch-4" name="alternateMobileNumber">'+
' <span class="lbl"></span>'+
'</label>';
return $(elemStr)[0];
},
custom_value: function(elem) {
var op = ($('input[name="alternateMobileNumber.value()"]').attr('checked'))? "1":"0";
return op;
}
},
答案 0 :(得分:0)
更改您的custom value function
赞,
custom_value: function(elem) {
var op = $('input[name="alternateMobileNumber"]').prop('checked') ? "1" : "0";
return op;
}