jquery ajax跳转

过滤器中设置respone.setStatus(600);

 

js中设置

 $(document).ajaxComplete(function(event,request, settings){
    if(request.status==600){
     if(parent.window){//iframe
      parent.window.location = "/webprojectname/";
     }else{
      window.location = "/webprojectname/";
     }
    }
});
try{
 Ext.Ajax.on('requestcomplete', function(conn,response,options){  
  if(response.status==600){
   parent.window.location = "/webprojectname/";  
  }  
 });
}catch(e){}

 

 

 

你可能感兴趣的:(jQuery ajax)