$.post(url, JSON.stringify(send_data), function(data, ts){},'json'); window.location.href = "http://" + localStorage.ServerIP;点击退出按钮以后向后端发送send_data,然后跳转到ServerIP
在chrome下后端可以收到send_data,但是Firefox下不能收到
只有把post设为同步,Firefox才能收到send_data
请问下有没有什么好的方法(除了设置同步),让前端发送完send_data以后再进行跳转?
$.ajax({ type:"post",
url:url, async:false,
data:JSON.stringify(send_data),
dataType:"json",
success:function(data){
}
});改用这种格式就能成功跳转+发送数据,这是为啥?
阿波罗的战车
相关分类