<script> if(top.location!=self.location){ alert("不是顶层窗口"); }else{ alert("是顶层窗口"); } </script>
就是判断 当前这个页面是否嵌套在iframe框架中。
<script> if(top.location!=self.location){ alert("不是顶层窗口"); }else{ alert("是顶层窗口"); } </script>
就是判断 当前这个页面是否嵌套在iframe框架中。
转载于:https://www.cnblogs.com/coder-lzh/p/9082967.html