ext radiogroup如何取值和设值

 1 var radios = Ext.create('Ext.form.Panel', {
 2     title: 'RadioGroup Example',
 3      300,
 4     height: 125,
 5     bodyPadding: 10,
 6     renderTo: Ext.getBody(),
 7     items:[{
 8         xtype: 'radiogroup',
 9         fieldLabel: 'Two Columns',
10         // Arrange radio buttons into two columns, distributed vertically
11         columns: 2,
12         vertical: true,
13         items: [
14             { boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
15             { boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
16             { boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
17             { boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
18             { boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
19             { boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
20         ]
21     }]
22 });
里面有设置项,把checked设为true,拿值的话用
var val = radios.down('radiogroup').getValue()['rb'];

摘自百度问答,地址:https://zhidao.baidu.com/question/981847790759065939.html
原文地址:https://www.cnblogs.com/symbol8888/p/7083940.html