窗口弹出窗口-如何使window.blur()或window.focus()在FireFox 4中工作? [英] Window popups - how to get window.blur() or window.focus() to work in FireFox 4?

查看:138
本文介绍了窗口弹出窗口-如何使window.blur()或window.focus()在FireFox 4中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道FF4不允许使用window.blur(),除非在FF配置中启用了升高或降低窗口"设置.简单地忽略该事件.

I'm aware that FF4 doesn't allow the use of window.blur() unless "Raise or lower window" setting is enabled in the FF configuration. It simple ignores the event.

我知道,即使关闭了此设置,某些站点仍可以设法打开一个弹出窗口并保持对当前窗口的关注.他们如何实现这一目标?

I'm aware that some site still manage to open a pop-up window and keep focus on your current window, even when this setting is switched off. How do they achieve this?

此外,当两个页面位于同一域中时,我不明白为什么.blur()和.focus()不起作用.根据 http://support.mozilla.com/zh-CN/questions /806756#answer-167267 应该可以.

Additionally, I don't understand why .blur() and .focus() doesn't work when both pages reside on the same domain. According to http://support.mozilla.com/en-US/questions/806756#answer-167267 this should work.

推荐答案

在默认设置下(

<div id="asd">click here</div>

如果没有window.open的额外额外参数,我就无法使其正常工作,所以他们有些事情.

I didn't manage to get it work without the hacky extra parameters to window.open, so there is something to them.

这篇关于窗口弹出窗口-如何使window.blur()或window.focus()在FireFox 4中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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