window.open(URL,名称,规格,替换) ??名称与替换
如果当前窗口是www.myparent.com
,通过单击按钮-a,它会调用此函数window.open('children','same','',??).新页面打开为
www.myparent.com/children
单击按钮 b,它会调用此函数 window.open('sub','same','',??)< /代码>。
www.myparent.com/children
被 www.myparent.com/sub
替换
现在我想知道,replace 有什么用(true/false )
。请查看语法定义
If current window iswww.myparent.com
by clicking a button-a, it invokes this function window.open('children','same','',??)
. The new page opens as www.myparent.com/children
Clicking button-b, it invokes this function window.open('sub','same','',??)
.
www.myparent.com/children
is replaced by www.myparent.com/sub
Now I want to know, what is the use of replace (true/false)
. Please take a look the syntax definition
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上这是语法
,这是 文档:
正如您从文档中看到的,代替
如果将其设置为 true,则在历史列表中,新窗口中打开的页面将替换您当前正在浏览的页面(IE 历史记录中不会有该页面)
Actually this is the syntax
and this is the documentation:
As you can see from the docs, replace
If you set it to true, in your history list the page that is opened in the new window replace the page you are currently browsing (I.E you will not have the page in history)