Home > Web Front-end > JS Tutorial > body text

有道JavaScript监听浏览器的问题_javascript技巧

WBOY
Release: 2016-05-16 18:24:44
Original
1100 people have browsed it

但不知道大家有没遇到这样一种情况,新开的窗口是通过打开 的,而不是window.opener或showModalDialog打开的。
尤其是需要注意的是:这个href指向的地址(页面)不是我们开发的,譬如,我们将href指向www.cnblogs.com。
OK,问题来了:假如我们在a 所在的页面有个按钮,可以触发点击事件并进行一些操作。 而这个点击事件需要在href打开的IE窗口关闭后触发。。。
这个时候,我们如何监视href打开的窗口呢?(通过javascript,不要说什么进程啥的东东).
假设有a.html如下:

复制代码 代码如下:

现在的要求就是:点击 "Link to B.HTML" 打开http://www.cnblogs.com。
打开的新窗口关闭后,触发a.html中的 btnParent 的点击事件~~~~

---
我相信很少有人做过这样的应用,或碰到这样的问题。 而我现在刚好碰到这样一个需求。
因此将问题发到这里来,让大家帮忙给揣摩揣摩。
虽然文章内容很少,但我想,这样一个问题还是值得上首页的。~~~^_^


心静似高山流水不动,心清若巫峰雾气不沾。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!