Ext.form.RadioGroup取值
在form在定义RadioGroup
1 new Ext.form.RadioGroup({
2 name:'selectsex',
3 id:'selectsex',
4 fieldLabel:'select',
5 hideLabel:true,
6 columns:2,
7 vertical:false,
8 items:[{
9 boxLabel:'男',inputValue:'1',name:'sex',checked:true
10 },{
11 boxLabel:'女',inputValue:'0',name:'sex'
12 }]
13 })
获取RadioGroup的值
1 var sex=Ext.getCmp('selectsex');
2 sex.eachItem(function(item){
3 if(item.checked===true){
4 alert(item.inputValue);
5 }
6 });