Making a window pop under in chrome(在 chrome 下弹出一个窗口)
问题描述
我有一个按钮需要打开一个新窗口作为弹出窗口(在父页面下).在 IE/Firefox 中,它可以正常工作,但在 chrome 中,弹出窗口出现在父窗口上方(顶部).
I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent window.
请提出修复建议.
用例/例如:好吧,例如,如果您看到 kayak.com 或任何旅游网站,您也可以在其他网站上搜索..我想做类似的事情,所以需要弹出...
use case/eg: Well, for eg if you see kayak.com or any travel website, you have the ability to search on other websites too..I want to do something similar so need the pop under...
代码:我使用的是 window.open(.......).blur(),但由于某种原因它不能在 chrome 中工作.
Code: I am using a window.open(.......).blur(), but for some reason it isnt working in chrome.
推荐答案
我收回我的评论,是可能的.
I take back my comment, is possible.
以下内容对我有用.(测试了最新的生产 chrome)
The following worked for me. (tested latest production chrome)
var url = "yourURL.html";
window.open(url, "s", "width= 640, height= 480, left=0, top=0, resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no").blur();
window.focus();
像所有事情一样,如果您惹恼了访问者,您的访问者就会减少.
Like all things, if you annoy your visitors you will have less visitors.
这篇关于在 chrome 下弹出一个窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 chrome 下弹出一个窗口
基础教程推荐
- 每次设置弹出窗口的焦点 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
