在页面内加入如下判断条件
// 如果页面被嵌入到iframe中,则以下条件必定不相等if (window.top !== window.self) { window.location.href = '跳转到另外一个页面的地址';}