<iframe>标签里的跳转问题

1、<iframe>里的<a>标签跳转,关键在于target:

target="_top"跳转到最外一层;

target="_parent"跳转到上一层;

target="_blank"跳转到新页面;

2、js跳转:

window.location.href.location.href 本页面跳转;
parent.location.href 上一层页面跳转;
top.location.href 最外层页面跳转;

3、<form>:

<form target="_blank">: form提交后弹出新页面;
<form target="_parent">: form提交后上一层页面跳转;
<form target="_top"> : form提交后最外层页面跳转;

4、刷新:

parent.location.reload():上一层页面刷新
window.opener.document.location.reload():上一层页面刷新(使用子窗口的opener对象来获得父窗口对象)
top.location.reload():最外层页面刷新

posted @ 2016-05-09 14:15  皓月千里  阅读(2003)  评论(0编辑  收藏  举报