Iframe在重定向后仍然显示
问题描述:
在我的经典asp应用程序中,我有一个包含2个iframe的页面。 leftframe有一个搜索框。当用户在搜索框中输入内容并按回车键 时,其用户重定向到结果页面(Redirectpage.asp,它没有任何框架), 重定向到Riderectpage.asp页面后,右框架仍然存在于页。 任何想法如何删除这个右帧。 我们正在使用JavaScript重定向。这是我的代码。Iframe在重定向后仍然显示
<script>
var ServerName = document.location.host;
document.location.href ='http://' + ServerName + '/' + 'Redirectpage.asp)
</script>
答
你需要通过设置top.location
这是真正有用的重定向外框。 – Henry