Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/455.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 是否显示文本字段的字段标签?_Javascript_Html_Extjs - Fatal编程技术网

Javascript 是否显示文本字段的字段标签?

Javascript 是否显示文本字段的字段标签?,javascript,html,extjs,Javascript,Html,Extjs,我想知道文本字段的字段标签。以下是我目前得到的信息: var ok = Ext.ComponentQuery.query('textfield[itemId=fieldID]')[0]; //how to get the field label of that textfield???? 您需要使用中所述的getFieldLabel()方法 这是一个 Ext.ComponentQuery.query('#myField')[0]。getFieldLabel()

我想知道文本字段的字段标签。以下是我目前得到的信息:

var ok = Ext.ComponentQuery.query('textfield[itemId=fieldID]')[0];
//how to get the field label of that textfield????

您需要使用中所述的
getFieldLabel()
方法

这是一个

Ext.ComponentQuery.query('#myField')[0]。getFieldLabel()

                                             {
                                                xtype:'textfield',
                                                fieldLabel: 'Locater',
                                                width: 200,
                                                id:'txtid',
                                                labelWidth: 60,
                                                padding: '0 0 0 5',
                                            },
                                            {
                                                xtype: 'button',
                                                handler: function () {
                                                    var f1 = Ext.getCmp('txtid').getFieldLabel();
                                              alert(f1);
                                                }
                                            }