【发布时间】:2012-03-19 20:33:24
【问题描述】:
我在 index.html 文件上使用框架。在框架的每个页面上,我都有一个代码检查页面是否在框架中,如果没有,则重定向到 index.html。
现在。我不仅想检查页面是否在框架中并重定向到 index.html,而且我还想在 index.html 上的一个框架中打开页面。
截至目前,我已经用这段代码嵌入了 JS 文件:
if (top.location == self.location)
{
top.location = 'index.html'
}
有没有你可能知道的脚本?
【问题讨论】:
标签: javascript html frame frameset