Javascript 功能在Firefox上无法正常工作
我有以下功能,它在Chrome上可以正常工作,但在Firefox和IE上不能正常工作,我做错了什么Javascript 功能在Firefox上无法正常工作,javascript,Javascript,我有以下功能,它在Chrome上可以正常工作,但在Firefox和IE上不能正常工作,我做错了什么 $('.bookmarkbutton').on('click',function(){ var pos = $(window).scrollTop(); $.ajax({ type: "GET", url: $(this).attr('href'), success: function(response) {
$('.bookmarkbutton').on('click',function(){
var pos = $(window).scrollTop();
$.ajax({
type: "GET",
url: $(this).attr('href'),
success: function(response) {
$.cookie('scroll', pos);
location.reload(current_page);
}
});
});
匹配,替换代码位置。重新加载(当前页面);用这个
history.go(0);
或
location.reload是firefox和ie的已知问题。ok,但我想将页面重新加载到存储在当前页面变量中的url,并返回到单击按钮的位置,但它没有这样做。
window.location.href = window.location.href;