How to window.open with a toolbar in Google Chrome?(如何在 Google Chrome 中使用工具栏打开 window.open?)
问题描述
以下 javascript 在 Firefox、Safari、IE 和 Google Chrome 中打开一个弹出窗口:
The following javascript opens a pop-up in Firefox, Safari, IE, and Google Chrome:
window.open("http://google.com", "foo", "toolbar=yes,location=yes,menubar=yes")
但是,在 Google Chrome 中,工具栏(带有通常的前进和后退按钮等)不会出现在弹出窗口中.(在 Windows 和 Mac 上测试.)
However, in Google Chrome the toolbar (with the usual forward and back buttons, etc.) does not appear on the popped-up window. (Tested on both Windows and Mac.)
我该如何解决这个问题?我希望用户能够使用他们最熟悉的工具向前和向后导航.
How can I fix this? I would like the user to be able to navigate forward and back using the tools with which they are most familiar.
推荐答案
不幸的是,Chrome 在使用 window.open 时只支持一小部分窗口功能.如果您认为这是一个错误或问题,您可以将其提交到 [http://crbug.com].
Unfortunately Chrome only supports a small set of window features when using window.open. If you believe that this is a bug or an issue you can file it at [http://crbug.com].
如果您只使用 window.open(url) ,那么它将在同一个窗口中打开一个新标签页,其中包含您想要的按钮.
If you just use window.open(url) then it will open a new tab in the same window with the buttons you desire.
这篇关于如何在 Google Chrome 中使用工具栏打开 window.open?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Google Chrome 中使用工具栏打开 window.open?


基础教程推荐
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01