ExtJs checkboxgroup选择事件

来源:互联网 发布:淘宝店铺门头图片 编辑:程序博客网 时间:2024/06/10 06:38
        {            xtype: 'checkboxgroup',            layout: 'hbox',            fieldLabel: '队伍',            labelWidth:70,            labelAlign:'right',            id:'v_procession',            items: [                { boxLabel: '五队',margin:'0 10 0 0', name: 'v_procession', inputValue: '0', checked: true,                    listeners : {                        change:function(el,checked){                            if(checked){                                alert('Value:'+el.inputValue+"          BoxLabel:"+el.boxLabel);                            }                        }                    }                },                { boxLabel: '三队', margin:'0 10 0 0', name: 'v_procession', inputValue: '1',                    listeners : {                        change:function(el,checked){                            if(checked){                                alert('Value:'+el.inputValue+"          BoxLabel:"+el.boxLabel);                                var hobbyValue = Ext.getCmp('v_procession').getChecked();                                var hobby='';                                Ext.Array.each(hobbyValue, function(item){                                    hobby += '+' + item.boxLabel;                                });                                Ext.MessageBox.alert('提示', hobby);                            }                        }                    }                },            ],        },
0 0