我想要History.back();
完全刷新前一页的功能。
任何想法如何做到这一点(并使其在 IE、FF 和 Chrome 中工作)。
您可以(通过 window.location)重定向到 document.referrer
IE
window.location.href = document.referrer;
Internet Explorer 修复将引荐来源网址传递到特定位置:
if(IE){ //IE, bool var, has to be defined
var newlocation = document.createElement('a');
newlocation.href = URLtoCall;
document.body.appendChild(newlocation);
newlocation.click();
}
您还可以使用 location replace() 方法:
window.location.replace(document.referrer)