ExtJS 获取复选框的值 checkboxgroup 获取值 fieldset(checkbox) 获取值

来源:互联网 发布:如何查看应用程序端口 编辑:程序博客网 时间:2024/05/16 12:36

checkboxgroup 获取值

定义:

{                xtype: 'checkboxgroup',                fieldLabel: 'Hobby',                id: 'hobby',                columns: 2,                vertical: true,                items: [                    { boxLabel: 'music', name: 'rb', inputValue: '1', checked: true },                    { boxLabel: 'sport', name: 'rb', inputValue: '2' },                    { boxLabel: 'draw', name: 'rb', inputValue: '3' }                ]}

获取值:

//获取通过checkboxgroup定义的checkbox值                    var hobbyValue = Ext.getCmp('hobby').getChecked();                    var hobby;                    Ext.Array.each(hobbyValue, function(item){                        hobby += '+' + item.boxLabel;                    });                    Ext.MessageBox.alert('提示', '您的兴趣是' + hobby);


原创粉丝点击