- Ext.onReady(function(){
- var myCheckboxGroup = new Ext.form.CheckboxGroup({
- id:'myGroup' ,
- xtype: 'checkboxgroup' ,
- renderTo :'form-cb' ,
- fieldLabel: 'Single Column' ,
- itemCls: 'x-check-group-alt' ,
- columns: 3 ,
- items: [
- {boxLabel: '唱歌' , name: '1' },
- {boxLabel: '游泳' , name: '2' , checked: true },
- {boxLabel: '看书' , name: '3' },
- {boxLabel: '旅游' , name: '4' },
- {boxLabel: '游戏' , name: '5' },
- {boxLabel: '睡觉' , name: '6' }
- ]
- });
- //CheckboxGroup取值方法
- for (var i = 0 ; i < myCheckboxGroup.items.length; i++)
- {
- if (myCheckboxGroup.items.itemAt(i).checked)
- {
- alert(myCheckboxGroup.items.itemAt(i).name);
- }
- }
- });
ext checkboxgroup 取值
最新推荐文章于 2024-09-03 09:33:46 发布