Javascript

【ExtJs】FormPanel.getForm().getValues():获取表单键值对

本文主要是介绍【ExtJs】FormPanel.getForm().getValues():获取表单键值对,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

示例代码:

var formExample = new Ext.form.FormPanel({
                 xtype:'form',
                 name:"ContentPublish", 
                 items:[
                    {  
                        xtype:'fieldset', 
                        title: '考核明细',
                        collapsible: true,
                        checkboxToggle: true,
                        collapsed: true,  
                        submitValue:true,
                        name:'scoreDeduct',
                        autoHeight:true, 
                        defaultType: 'textfield',
                        items :[{ 
                                submitValue:true,
                                name:'Field1',
                                value:'one',
                                fieldLabel: 'Field 1'
                            }, {
                                submitValue:true,
                                name:'Field2',
                                value:'two',
                                fieldLabel: 'Field 2'
                            }, { 
                                value:'three',
                                fieldLabel: 'Field 3'
                            }
                        ]
                    } 
                 })

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

//p.getForm().getValues()结果:
{

Field1:"one",

Field2:"two",

ext-comp-1056: "three"

}
这篇关于【ExtJs】FormPanel.getForm().getValues():获取表单键值对的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!