lytxt

window.location.href的target控制

window.location.href的target控制

在使用框架时,经常会对框架子页面进行页面引导的情况,如果只是简单的设置location. href="",会使得整个页面显示在子框架中,导致出现重叠框架。如何解决呢?很简单。只要指定子框架的父级框架页面链接至目标页面即可。如

window.top.framename.location.href = url;

window.parent.location.href=url;

mainframe.location.href=url;

posted on 2009-01-07 09:39  liuyu  阅读(23944)  评论(0)    收藏  举报

导航