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

问题描述

我有一个简单的页面:

 < html> 
< head>
< script type =text / javascript>
function popUnder(){
var adv = window.open('http://google.com','_blank','status = 1,height = 600,width = 600,resizable = 1 );
adv.blur();
window.focus();
}
< / head>
< body onclick =javascript:popUnder();>
...
< / body>
< / html>

但在Firefox 9中弹出式窗口不起作用。
在此页面上当dom.disable_window_flip == true时,所有的窗口都会弹出窗口。
创建弹出式窗口的最简单和正确的方法是什么?或者是用window.open在Firefox中创建弹出窗口的解决方案?解决方案

这个行为是在Firefox 4中引入的。

这个:仍然可以在FF10中使用。


I have a simple page:

<html>
<head>
  <script type="text/javascript">
    function popUnder() {
      var adv = window.open('http://google.com', '_blank', 'status = 1, height = 600, width = 600, resizable = 1');
      adv.blur();
      window.focus();
    }
</head>
<body onclick="javascript: popUnder();">
...
</body>
</html>

But pop-under not works in Firefox 9.On this page https://bug369306.bugzilla.mozilla.org/attachment.cgi?id=296123 all of windows are pop-ups when dom.disable_window_flip == true.What is the simplest and right way to create pop-unders? Or it is no solutions for creating pop-unders in Firefox with window.open?

解决方案

this behaviour was introduced with Firefox 4.

This workaround: https://gist.github.com/1021924 still works in FF10.

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

11-02 01:38