您的位置:首页 > 其它

ifram跳转

2015-08-01 09:09 176 查看
<a href="666.html" target="_top">

<a href="666.html" target="_parent">  让它链接目标为父框架就可以了

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

JS跳转
window.location.href、location.href 本页面跳转,D页面跳转

parent.location.href 上一层页面跳转,C页面跳转

top.location.href 最外层页面跳转,A页面跳转

链接或者form
D页面中有form

<form>: form提交后D页面跳转

<form target="_blank">: form提交后弹出新页面

<form target="_parent">: form提交后C页面跳转

<form target="_top"> : form提交后A页面跳转

parent.location.reload():C页面刷新

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

top.location.reload():A页面刷新
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  web ifram 跳转