错误:Cannot read property 'submit' of undefined
代码如下:
Ext.onReady(function(){
var login = Ext.getDom("loginBox");
var simple = new Ext.FormPanel({
labelWidth: 75, // label settings here cascade unless overridden
renderTo:loginBox,
frame:true,
title: '登录',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: '帐号',
id : "username",
allowBlank:false //不为空
},{
fieldLabel: '密码',
id : 'password'
}],
buttons: [{
text: '登录',
handler: function()
{
login.form.submit({
waitTitle:"请稍候",
waitMsg:"正在提交表单数据,请稍候"
});
}
},{
text: '取消'
}]
});
})