艺海无涯,学无止境。欢迎一起探讨技术和人生,了解我

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

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