Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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
Extjs 无法在sencha touch 2.2表单面板上获取html文本框值_Extjs_Sencha Touch - Fatal编程技术网

Extjs 无法在sencha touch 2.2表单面板上获取html文本框值

Extjs 无法在sencha touch 2.2表单面板上获取html文本框值,extjs,sencha-touch,Extjs,Sencha Touch,我正在使用sencha touch 2.2。 我正在Ext.form.Panel上设置Sencha Touch中的html,如下所示 Ext.define('MyApp.view.MyFormView', { extend: 'Ext.form.Panel', xtype: 'MyFormView', config: { items:[ { xtype: 'fieldset', title: 'Add Form Details', items:[ . . . { html: [ '<di

我正在使用sencha touch 2.2。 我正在Ext.form.Panel上设置Sencha Touch中的html,如下所示

Ext.define('MyApp.view.MyFormView', {
extend: 'Ext.form.Panel',
xtype: 'MyFormView',
config: {
items:[
{
xtype: 'fieldset',
title: 'Add Form Details',
items:[
.
.
.

{
html: [
'<div class="formula-div"><input id="textbox1" type="text" class="text-box-width"/> / <input id="textbox2" type="text" class="text-box-width"/></div>'
].join("")
},
.
.
.

]
}
]
}
});
我想获取html文本框的值。 我试过这个 document.getElementById('textbox1').value 但它不会返回任何值


当我用add按钮移除面板并直接调用form时,我得到了这个值。

正如Kevhender所建议的,最好使用
Ext.field.TextArea
Ext.field.Text
在项目中创建文本框。从那时起,您就更容易获得文本框的值,就像
Ext.getCmp(“文本框的ID”).getValue()

以下是一些有用的链接:


您使用
html
config来绘制这样的文本区域有什么原因吗?您最好使用
Ext.field.TextArea
组件。文件如下:
controller.getNavView().push(myForm);