Js常见点击跳转方式

在原有的页面跳转

window.location.href='next.html'

返回上一页

window.history.back(-1)

top跳转

top.location.href='next.html'

打开新窗口

window.open("next.html");  

重定向来跳转(不留栈)

window.location.replace("next.html");

刷新页面

location.reload();

你可能感兴趣的:(Js)