ext调用java后台返回json数据


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:'用户名或者密码错误!!!'}"; 

你可能感兴趣的:(JavaScript,java,jsp,json,ext)