Data returned between windows

Source: Internet
Author: User

Specifies the ument object.

Although it was solved, it also had a headache for a while. After the solution was solved, it was very simple.


Method 1: Use the parent window to configure open(example, use opener.doc ument. getelementbyid (), and then return the value;

When the subwindow needs to be refreshed or reloaded: Use window. localtion = URL in the subwindow;

Method 2: window. showmodaldialog () is used for the parent window, and window. returnvalue = value is used for the subwindow (window opened through showmodaldialog;

Method 3: (The subwindow needs to be refreshed or reloaded)

1: Add <base target = "_ Self"> between <HTML> and

2: Add a hidden <A> label to the page, for example, <a id = "reload" href = "" tyle = "display: none"> reload </a>

3: In JS, assign the address of the current page to the href attribute of <A> and add a random value so that IE does not read the page in the cache and click the event.

Reload. href = Window. Location. href + "& random =" + math. Random ();

Reload. Click ();

Note: Reload is the defined <A> tag ID.
Method 3 ReferenceHttp://midnightair.iteye.com/blog/287634

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.