现在的位置: 首页 > 综合 > 正文

ExtJs技巧 FormPanel.getForm().getValues()的键名问题.

2013年10月03日 ⁄ 综合 ⁄ 共 538字 ⁄ 字号 评论关闭
var p = new Ext.form.FormPanel({
                 xtype:'form',
                 name:"ContentPublishSeting", 
                 items:[
                    {  
                        xtype:'fieldset', 
                        title: '方式一:在线发布到网站',
                        //collapsible: true,
                        checkboxToggle: true,
                        collapsed: true,  
                        submitValue:true,
                        name:'sendToWeb',
                        autoHeight:true, 
                        defaultType: 'textfield',
                        items :[{ 
                                submitValue:true,
                                name:'Field1',
                                value:'111',
                                fieldLabel: 'Field 1'
                            }, {
                                submitValue:true,
                                name:'Field2',
                                value:'222',
                                fieldLabel: 'Field 2'
                            }, { 
                                value:'333',
                                fieldLabel: 'Field 3'
                            }
                        ]
                    } 
                 })

 

 p.getForm().getValues()的结果会是 

{

Field1:"111",

Field2:"222",

ext-comp-1031"333"

}


这里重点区别就是 submitVlaue:true,和 name:'field2' 两个属性




抱歉!评论已关闭.