js 跳转新页面

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了js 跳转新页面相关的知识,希望对你有一定的参考价值。

window.location = "http://www.xxxxxxxx.net" 跳转后有后退功能 
其实应该是 window.location.href
window.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能 

window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接 
这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了

 

 

window.location.reload();
window.location = "/Admin/UserList";
window.open("/Admin/UserList");

window.location.href = ‘/Admin/UserList‘; 

window.location.reload()刷新当前页面.

parent.location.reload()刷新父亲对象(用于框架)

opener.location.reload()刷新父窗口对象(用于单开窗口)

top.location.reload()刷新最顶端对象(用于多开窗口)






以上是关于js 跳转新页面的主要内容,如果未能解决你的问题,请参考以下文章

不同网址自动跳转新页面需求下写的简单js方法——源自码农的想偷懒

不同网址自动跳转新页面需求下写的简单js方法——源自码农的想偷懒

跳转新页面并传值的方法

Layui table中显示图片,存session的方式跳转新iframe,进行添加,编辑和删除

Vue路由的页面跳转打开新页面

vue中使用$router.push跳转新页面