gpt4 book ai didi

javascript - 无法使用 javascript 在 Firefox 上刷新

转载 作者:行者123 更新时间:2023-11-28 07:40:27 26 4
gpt4 key购买 nike

Firefox 中的缓存现在对我来说真的很痛苦,我知道这个问题已经被问过好几次了。

但是真的没有其他方法可以让 window.location.reload(); 在 Firefox 中工作吗?它在 chrome 中工作得很好

我已经尝试了在 Google 和 stackoverflow 上可以找到的所有方法,但没有一个适合我的情况。

我尝试过以下方法:

document.location.reload(true);
window.href=window.href;
window.location.href;

我还尝试为 js 文件分配不同的版本。

我想看看是否有其他方法可以绕过这个。

<小时/>

这就是我的 js 文件的样子。

$(".drag").sortable({ // begin sortable
connectWith: ".drag",
receive: function(event, ui) { // begin receive
var id = $(ui.item).attr('id');
var status = this.id;
//alert(id);
$.ajax({ // begin ajax
url: "ajax/connectwith-multiple.ajax.php",
type: "GET",
data: {
'sales_card_id': id,
'status': status
}
}) // end ajax
//refresh page when ajax is completed
document.location.reload(true);
});
}, // end receive
}) // end sortable

最佳答案

这是我在上述评论的帮助下对上述问题的解决方案。

$(".drag").sortable({ // begin sortable
connectWith: ".drag",
receive: function(event, ui) { // begin receive
var id = $(ui.item).attr('id');
var status = this.id;
//alert(id);
$.ajax({ // begin ajax
url: "ajax/connectwith-multiple.ajax.php",
type: "GET",
data: {
'sales_card_id': id,
'status': status
}
}) // end ajax
//refresh page when ajax is completed
.always(function() {
window.location.reload();
});
}, // end receive
}) // end sortable

关于javascript - 无法使用 javascript 在 Firefox 上刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28094783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com