好记性不如烂笔头。

js在iframe顶级窗口中打开当前页面

if (parent.location.href != "" && parent.location.href != window.location.href) {
parent.location.href = window.location.href;
}