Js href 以及打开新的窗口

//以下方法在浏览器同一窗口操作

self.location.href="/url" 当前页面打开URL页面 location.href="/url" 当前页面打开URL页面 windows.location.href="/url" 当前页面打开URL页面,前面三个用法相同。 parent.location.href="/url" 在父页面打开新页面 top.location.href="/url" 在顶层页面打开新页面
window.location.reload();//刷新当前页面


//浏览器打开新的窗口
window.open("url");

 

posted @ 2021-08-05 11:47  唏嘘-  阅读(1811)  评论(0编辑  收藏  举报