Js page out of the frameset framework sample introduction

  • 2020-03-30 01:02:13
  • OfStack

A lot of web pages are framed, and in many cases, buttons will be clicked on events or links to move out of the frame to other interfaces. For example, click "log out" to return to the login screen.

1. There are several ways to write out of the frame by running the script:
1.<script language = javascript>window.open('Login.aspx','_top')</script>" 
2.<script language = javascript>window.open('Login.aspx','_parent')</script>" 
3.<script language = javascript>window.parent.location.href='login.aspx'</script> 
4. Response.Write("<script>window.parent.opener=null;window.top.close();</script>") 

This method closes the original frame window and then opens a new one. This is true for many feature interfaces where the browser Settings are changed and the login interface is returned to the default Settings.

Two, link out of the frame
In this case, it's easy to add the target="_top" attribute.
It will jump to another page.

Related articles: