JS page jump Problem (jump to the parent page, the outermost page, this page)

Source: Internet
Author: User

JS page Jump: This page jump, on a page jump, the outermost page to jump, below for everyone to share under the different pages of the home jump problem, interested friends can learn under the "Window.location.href", "location.href" is this page jump

"Parent.location.href" is a page jump on the previous level

"Top.location.href" is the outermost page jump

To illustrate:

If a,b,c,d are Jsp,d is C iframe,c is B's iframe,b is an IFRAME, if D JS so write

"Window.location.href", "location.href": D page Jump

"Parent.location.href": C page Jump

"Top.location.href": a page jump

If there is a form on the D page,

<form&gt: After form submission D page jump

<form target= "_blank";: New page pops up after form submission

<form target= "_parent";: C page jump after form submission

<form target= "_top" >: Form submitted after a page jump

About page refreshes, this is written in the D page:

"Parent.location.reload ();": C page Refresh (of course, you can also use the opener object of a child window to get the object of the parent window: Window.opener.document.location.reload (); )

"Top.location.reload ();": a page refresh

JS page jump Problem (jump to the parent page, the outermost page, this page)

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.