在铬下弹出一个窗口 [英] Making a window pop under in chrome

查看:81
本文介绍了在铬下弹出一个窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个按钮需要打开一个新窗口作为弹出窗口(在父页面下)。在IE / Firefox中,它可以正常工作,但在Chrome浏览器中,弹出窗口显示在父窗口的上方。



请提出修正建议。



用例/ eg:例如,如果您看到kayak.com或任何旅游网站,您也可以在其他网站上搜索。我想要做类似的事情,所以需要在弹出...



代码:我正在使用window.open(.......)。blur(),但由于某种原因它不是工作在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();

就像所有的事情一样,如果你惹恼你的访问者,你的访问者就会减少。

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.

Please suggest a fix.

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...

Code: I am using a window.open(.......).blur(), but for some reason it isnt working in chrome.

解决方案

I take back my comment, is possible.

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.

这篇关于在铬下弹出一个窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆