Home > Backend Development > PHP Tutorial > JS的location.href如何跳出框架打开新页面_PHP

JS的location.href如何跳出框架打开新页面_PHP

WBOY
Release: 2016-06-01 12:21:00
Original
1143 people have browsed it

今天遇到个问题,后面在框架中,当判断登录失效后要返回登录页面,但登录页面却在框架内打开,我想让它直接跳出框架打开(这里不是打开新窗口),终于在网上找到了办法,分享给大家:

echo "";

原内容是上边这样的,要想让它跳出框架打开登录页,需要使用下面的方法:

echo "";

其实就是在跳转链接前加一个window.top。如果在打开新窗口,可以使用js的window.open("url","打开方式"); 来打开新窗口。

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