$.ajaxSetup({error: onRequestCompleted}); function onRequestCompleted(xhr,textStatus,errorThrown) { location.href = ‘/login‘; }
JQuery中ajax错误处理之页面跳转
原文:http://www.cnblogs.com/flytome/p/5667944.html