History.Back与刷新 [英] History.Back with refresh

查看:176
本文介绍了History.Back与刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要完全刷新上一页的 History.back(); 功能。

I would like to have the History.back(); functionality with a complete refresh of previous page.

任何想法如何做到(并使其在IE,FF和Chrome中工作)。

Any idea how to do that (and make it work in IE, FF and Chrome).

推荐答案

你可以重定向( by window.location)to document.referrer

You could redirect (by window.location) to document.referrer

ie

window.location.href = document.referrer;

将引荐来源传递到特定位置的Internet Explorer修复:

Internet Explorer fix for passing referrer to a particular location:

if(IE){ //IE, bool var, has to be defined
    var newlocation = document.createElement('a');
    newlocation.href = URLtoCall;
    document.body.appendChild(newlocation);
    newlocation.click();
}

这篇关于History.Back与刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆