网上搜集,总结记录一下
window.top //最顶层窗口
window.self //当前窗口
window.parent //父级窗口
“window.location.href”、"location.href"是本页面跳转
"parent.location.href"是上一层页面跳转
"top.location.href"是最外层的页面跳转
举例说明:
如果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页面跳转
如果D页面中有form的话,
iframe框架页面跳转
最新推荐文章于 2023-07-22 00:45:00 发布
本文详细介绍了JavaScript中window对象的属性与方法,包括window.top、window.self、window.parent等,以及它们在页面跳转和刷新中的应用。通过实例解释了在不同层级的iframe中如何实现特定页面的跳转和刷新。
7081

被折叠的 条评论
为什么被折叠?



