ajax 请求登录成功后,返回上个浏览界面
if(data.result=="success"){
var prevLink = document.referrer;
console.log(prevLink);
if($.trim(prevLink)==''){
location.href = '/';
}else{
if($.trim(prevLink)=='http://localhost/login.jsp'){
location.href = '/';
}else if($.trim(prevLink)=='http://localhost/register.jsp'){
location.href = '/login.jsp';
}else{
location.href = prevLink;
}
}
}