您的位置:首页 > Web前端 > JavaScript

extjs 初始化checkboxgroup值的代码

2011-09-21 00:00 465 查看
Ext.override(Ext.form.CheckboxGroup,{ 

setValueForItem : function(val){ //多个选项值以逗号分开的 
val = ","+val+"," 
this.items.each(function(item) { 
if (val.indexOf(item.inputValue) > -1) { 
item.setValue(true); 
} else { 
item.setValue(false); 
} 
}); 
} 
,clearValueForItem:function(){ // 清空所有值 
this.items.each(function(item) { 
item.setValue(false); 
}); 
} 
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: