The usage example of JS settimeout Opener _ Basics

Source: Internet
Author: User
Copy Code code as follows:

$ ("#saveInfo"). Show ();
SetTimeout (' $ (' #saveInfo '). Hide (); ', 3000;
if (opener&&!opener.closed) {
Opener.location.reload (TRUE);
}

SetTimeout: How long does it take to implement the method, specific use: http://www.jb51.net/article/35535.htm

Opener: Refers to parent to express the parents window, such as a page using an IFRAME or frame to call B page, then a page is the window is the B page parent. In JS, Window.opener is just a reference to the pop-up window's parent window. For example: a.html, by clicking the button and so on to window.open out a new window b.html. Then in b.html, we can use Window.opener (omit write as opener) to reference a.html, including a.html document and other objects, manipulate a.html content.
If this reference fails, then NULL is returned. Therefore, before calling the opener object, you must first determine whether the object is null, otherwise the "object is empty or does not exist" JS error.

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.