Home > Web Front-end > HTML Tutorial > iframe jump method - HappyRocking's column - CSDN blog

iframe jump method - HappyRocking's column - CSDN blog

一个新手
Release: 2017-09-21 10:43:35
Original
2032 people have browsed it

1. Background

A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,在D中跳转页面的写法区别如下。
Copy after login

2. JS jump

window.location.href、location.href 本页面跳转,D页面跳转
parent.location.href 上一层页面跳转,C页面跳转
top.location.href 最外层页面跳转,A页面跳转
Copy after login

3. Link or form

D页面中有form
<form>: form提交后D页面跳转
<form target="_blank">: form提交后弹出新页面
<form target="_parent">: form提交后C页面跳转
<form target="_top"> : form提交后A页面跳转
Copy after login

4. Refresh

parent.location.reload():C页面刷新
window.opener.document.location.reload():C页面刷新(使用子窗口的opener对象来获得父窗口对象)
top.location.reload():A页面刷新
Copy after login

The above is the detailed content of iframe jump method - HappyRocking's column - CSDN blog. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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