Question about listening to browsers with youdao JavaScript

Source: Internet
Author: User

But I don't know if you have encountered such a situation. The new window is opened through <a href = ""/> instead of window. opener or showModalDialog.
In particular, note that the address (PAGE) pointed to by this href is not developed by us. For example, we direct href to www.cnblogs.com.
OK, the problem is: if we have a button on the page where a is located, we can trigger the Click Event and perform some operations. This click event needs to be triggered when the IE window opened by href is closed...
At this time, how do we monitor the windows opened by href? (Through javascript, do not talk about processes or things ).
Assume a.html is as follows:
Copy codeThe Code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> a.html </title>
<Meta name = "generator" content = "editplus"/>
<Meta name = "author" content = ""/>
<Meta name = "keywords" content = ""/>
<Meta name = "description" content = ""/>
</Head>
<Body>
<Input type = "button" id = "btnParent" onclick = "alert ('A');" value = "Click! "/>
<A href = "http://www.cnblogs.com" target = "_ blank"> Link to B. HTML </a>
</Body>
</Html>

Now the requirement is: click "Link to B. HTML" to open the http://www.cnblogs.com.
After closing the window, send the btnParent Click Event in a.html ~~~~

---
I believe that few people have used such applications or encountered such problems. But now I have met such a requirement.
So I sent the question here, asking you to give it a try.
Although there are few articles, I think such a question is worth mentioning on the homepage .~~~ Pai_^
<H3>
It seems like a mountain flow of water does not move, the heart is clear if Wu Feng mist does not touch.
</H3>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.