简体   繁体   English

Chrome浏览器的window.open

[英]Chrome Browser's window.open

when I open a new window use the window.open function in chrome browser,the new window has no back button no matter what the parameters are. 当我打开新窗口时,使用chrome浏览器中的window.open函数,无论参数如何,新窗口都没有后退按钮。 Code like this below: 如下代码:

window.open(url,'newwindow','toolbar=yes, menubar=yes, location=yes, status=yes...');

Any helps will be gratefull! 任何帮助将不胜感激!

可能会解决您的问题

window.open(url, '_blank');

The new window won't have a history. 新窗口将没有历史记录。 Maybe you could hack something together with the HTML5 History API and Cookies: 也许您可以将某些内容与HTML5历史记录API和Cookie结合使用:

https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history https://developer.mozilla.org/zh-CN/docs/Web/Guide/API/DOM/Manipulating_the_browser_history

You can't do it because you can't have control on the manner Chrome opens its windows. 您之所以无法这样做,是因为您无法控制Chrome打开其窗口的方式。 It opens a new window, So it is a fresh page, so there is no previous page, Back button doesn't make any sense here, am I correct ? 它会打开一个新窗口,所以它是一个新页面,因此没有上一页,这里的“后退”按钮没有任何意义,对吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM