Home > Web Front-end > HTML Tutorial > 解决iframe无限嵌套问题。_html/css_WEB-ITnose

解决iframe无限嵌套问题。_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:59:00
Original
1317 people have browsed it

在被iframe嵌套的页面里跳转到登录页,登录后会把整个页面再次嵌套在该iframe内,这样一直登录就会一层一层的嵌套,

解决办法:

    if(self != top) {        top.location.href = window.location.href;    }
Copy after login

相关概念:self是当前窗口,top是最顶层窗口,parent是父窗口。

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