亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

firefox跟chrome的$.post()有什么區別嗎?

firefox跟chrome的$.post()有什么區別嗎?

慕俠2389804 2018-12-19 15:26:49
 $.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){                 }             });改用這種格式就能成功跳轉+發送數據,這是為啥?
查看完整描述

1 回答

?
慕沐林林

TA貢獻2016條經驗 獲得超9個贊

success:function(data){    window.location.href = "http://" + localStorage.ServerIP;
}


查看完整回答
反對 回復 2018-12-19
  • 1 回答
  • 0 關注
  • 757 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號