Home > Web Front-end > JS Tutorial > Usage of js href_javascript skills

Usage of js href_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:27:19
Original
2884 people have browsed it

"window.location.href" and "location.href" are the jumps to this page

"parent.location.href" are the jumps to the previous page

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

Example:

If A, B, C, and D are all jsp, D is the iframe of C, C is the iframe of B, and B is A's iframe, if the js in D writes

"window.location.href", "location.href": D page jumps to

"parent.location.href": C page Jump

"top.location.href": Jump to page A

If there is a form in page D,

: Jump to page D after the form is submitted. Go to

: A new page pops up after the form is submitted

: Page C jumps after the form is submitted

: Page A jumps after the form is submitted Go to



Regarding page refresh, D page writes:


"parent.location.reload();": C page refresh (of course, also You can use the opener object of the child window to obtain the object of the parent window: window.opener.document.location.reload(); )



"top.location.reload();": A page refresh

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Where is js written?
From 1970-01-01 08:00:00
0
0
0
js file code not found
From 1970-01-01 08:00:00
0
0
0
js addClass not working
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template