[EXT]extjs中radio组的取值问题

来源:互联网 发布:淘宝招商平台 编辑:程序博客网 时间:2024/05/17 08:53

var fp = new Ext.FormPanel({
        frame: true,
        title:'Check/Radio Groups',
        labelWidth: 110,
        width: 600,
        renderTo:document.body,
        bodyStyle: 'padding:0 10px 0;',
        defaultType: 'radio',  // each item will be a radio button
        items: [{
            xtype: 'textfield',
            name: 'txt-test2',
           
            fieldLabel: 'Alignment Test'
        },{
            checked: true,
            fieldLabel: 'Favorite Color',
            boxLabel: 'Red',
            name: 'fav-color',
           
            inputValue: 'red'
        },{
            fieldLabel: '',
            labelSeparator: '',
            boxLabel: 'Blue',
            name: 'fav-color',
          
            inputValue: 'blue'
        },{
            fieldLabel: '',
            labelSeparator: '',
            boxLabel: 'Green',
            name: 'fav-color',
           
            inputValue: 'green'
        }],
        buttons: [{
            text: 'Save',
            handler: function(){
          Ext.Msg.alert("",fp.form.findField("fav-color").getGroupValue());
            }
        },{
            text: 'Reset',
            handler: function(){
                fp.getForm().reset();
            }
        }]

 });

原创粉丝点击