我有一個textfield in Sencha Touch 2和一個按鈕。當按下按鈕時,我想要輸入文本框。我用Ext.ComponentQuery試了一下,但沒有奏效。有人舉例說明如何做到這一點?獲取textfield的輸入
{
xtype: 'textfield',
cls: 'inputfields',
id: 'title',
},
{
xtype: 'button',
ui: 'action',
name: 'textfieldButton',
handler : function(){
// what should go here ?
}
}
提示:不要在標題中寫入Sencha Touch 2,請添加sencha-touch-2標籤。然後更容易找到Sencha Touch 2助手。 –