1
1 //判断当前窗口是不是顶层窗口 2 if (window.self != window.top) { 3 //如果不是顶层窗口在顶层窗口的位置显示当前窗口的资源 4 window.top.location.href="login.jsp"; 5 }