实际上我有一个ExtJs脚本来创建窗口,下面有一个Window.
var frmAccount = Ext.create('Ext.form.Panel',{
bodyPadding: 5,frame : true,items :[
{
xtype : 'textfield',fieldLabel : 'Account Number',name : 'accountNum'
},{
xtype : 'textfield',fieldLabel : 'Company',name : 'company'
},fieldLabel : 'Office',name : 'office'
},{
xtype : 'textareafield',fieldLabel : 'Address',name : 'address',width : 350
},fieldLabel : 'City',name : 'city'
},fieldLabel : 'Country',name : 'nation'
}]
});
var winAddAccount = Ext.create('widget.window',{
id : 'addAccount',title : 'Filter Record',width : 400,height : 300,modal : true,closeAction : 'hide',items : frmAccount,layout : 'fit',bodyPadding: 5,buttons:[
{
text : 'Find',handler: function(){
//console.log(form value);
}
},{
text : 'Cancel',handler: function(){
winAddAccount.hide();
}
}
]
});
我只想在点击“查找”按钮后从表单中获取值.
但是在点击“查找”按钮后,我不知道从表单中获取值.
希望我可以在处理程序上看到console.log脚本的值.
请帮助我解决或提出一个想法.
谢谢.