js判断当前页面是顶级窗口 <script> if(top.location!=self.location){ alert("不是顶层窗口"); }else{ alert("是顶层窗口"); } </script> 就是判断 当前这个页面是否嵌套在iframe框架中。