success:function(form,action){
window.location.href = 'index.jsp';
},
failure : function(form, action) {
if(action.failureType == 'server'){
Ext.Msg.alert('登錄錯誤',action.result.errors);
}else if(action.failureType == 'connect'){
Ext.Msg.alert('連接錯誤','指定路徑連接錯誤!');
}else{
Ext.MessageBox.alert('警告', '服務器數據傳輸失敗:'+action.response.responseText);
}
}
java返回的數據,成功為:String json="{success:true}",失敗為: String json="{success:false,errors:'用戶名或者密碼錯誤!!!'}";