判断是否是顶层窗口(父窗口) 如果不是让其在顶层窗口打开
<script type="text/javascript">
if(top.location!=self.location){
top.location.href = self.location.href;
} else {
// console.log(是顶层窗口)
}
</script>
转载于:https://www.cnblogs.com/luckyShuang/p/11343874.html
判断是否是顶层窗口(父窗口) 如果不是让其在顶层窗口打开
<script type="text/javascript">
if(top.location!=self.location){
top.location.href = self.location.href;
} else {
// console.log(是顶层窗口)
}
</script>
转载于:https://www.cnblogs.com/luckyShuang/p/11343874.html