Home > Web Front-end > JS Tutorial > body text

Introduction to the js frameset framework example that jumps out of the page_javascript skills

WBOY
Release: 2016-05-16 17:07:35
Original
864 people have browsed it

Many web pages have a frame structure. In many cases, button click events or links are used to jump out of the frame and go to other interfaces. For example, click "Logout" to return to the login interface.

1. There are several ways to jump out of the frame by running a script:

Copy the code The code is as follows:

1."
2."
3.
4. Response.Write("<script>window.parent.opener=null;window.top.close();</script>")
Response.Write("<script>window.open ('index.aspx','');</script>")

This method will first close the original frame window and then reopen a new window. This is applicable when the browser settings are changed in many functional interfaces and the default settings are used when returning to the login interface.

2. The link jumps out of the frame
This situation is very simple, just add the target="_top" attribute.
It will jump to other pages.
Related labels:
js
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template