ExtJs CheckboxGroup用法实例
呈现的时候:
for (var i = 1; i <= AimState["TotalPages"]; i++) {//禁用已经拆分过的页码
var splited = false;
$.each(selpagearray, function() {
if (this && this == i) {
splited = true;
return false;
}
});
itemarray.push({ boxLabel: "第" + i + "页", name: i, disabled: splited, checked: splited });
}
cbg = new Ext.form.CheckboxGroup({
id: 'myGroup',
xtype: 'checkboxgroup',
fieldLabel: 'Single Column',
itemCls: 'x-check-group-alt',
renderTo: 'div2',
columns: 12,
items: itemarray
})
提交的时候获取值
var selPages = "";
$.each(cbg.getValue(), function() {
if (!this.disabled && this.checked) {
selPages += this.name + ",";
}
})
return selPages;

浙公网安备 33010602011771号