动态改变表单元素的fieldLabel文字

表单元素(id必须定义)

            var txtState = new Ext.form.ComboBox({

                fieldLabel: '起运国',

                id:'txtState',

                resizable: true,

                mode: 'local',

                store: STATENAMEstore,

                displayField: 'STATENAME',

                valueField: 'STATENAME',

                anchor: '50%',

                triggerAction: 'all',

                editable: false,

                forceSelection: true,

                maxLength: 50

            });

动态改变fieldLabel

Ext.getCmp('txtState').el.dom.parentNode.parentNode.parentNode.firstChild.innerHTML = '出口国家:';

你可能感兴趣的:(label)