Detailed examples of js setTimeout opener usage

Source: Internet
Author: User

Copy codeThe Code is as follows:
$ ("# SaveInfo"). show ();
SetTimeout ('$ ("# saveInfo"). hide ();', 3000 );
If (opener &&! Opener. closed ){
Opener. location. reload (true );
}

SetTimeout: How long is the latency to execute? Use: http://www.jb51.net/article/35535.htm

Opener: parent indicates the parent window. For example, if A page A uses iframe or frame to call page B, the window of page A is the parent of page B. In JS, window. opener only references the parent window of the pop-up window. For example, in a.html, window. open a new window B .html by clicking a button. In B .html, you can access the.html content by writing an example of opener(specifically, opener.pdf to reference a.html, and wrap the.html documentobject.
If this reference fails, null is returned. Therefore, before calling an opener object, you must first determine whether the object is null. Otherwise, a JS error "the object is empty or does not exist" will occur.

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.