解决layui登录出现iframe图层嵌套问题 <script> if(window != top){ top.location.href=location.href; }; </script> 在layui的iframe模板中,页面通过iframe方式引入的,所以在子(iframe)页面跳转的页面依然显示在内联框架中,而不是父页面跳转; top.location.href(最外层的页面跳转),或者使用parent.location.href是上一层(包裹iframe的)页面跳转