js页面跳转刷新

刷新当前页面

location.replace(location.href);

跳转到下一页

window.location.href(“01.html”);//IE有效,FF无效
window.location.href=“01.html”; //IE有效,FF有效效
window.location=“01.html”; //IE有效 FF有效
location.href=“01.html”; //IE有效 FF有效
location.href=“01.html”; //IE有效 FF 有效
self.location.href="/url" 当前页面打开URL页面
ocation.href="/url" 当前页面打开URL页面
windows.location.href="/url" 当前页面打开URL页面,前面三个用法相同。
this.location.href="/url" 当前页面打开URL页面
parent.location.href="/url" 在父页面打开新页面
top.location.href="/url" 在顶层页面打开新页面

返回上一次预览界面

window.history.back(-1);

猜你喜欢

转载自blog.csdn.net/RUANJIAOXIAOZI/article/details/86620725