I encountered a problem today. In the frame, when the login is judged to be invalid, I need to return to the login page, but the login page is opened within the frame. I want it to open directly out of the frame (this is not a new window), and finally I found a method online and share it with everyone:
echo "";
The original content is as above. If you want it to jump out of the frame and open the login page, you need to use the following method:
echo " ";
In fact, just add a window.top before the jump link. If you are opening a new window, you can use js's window.open("url","open method"); to open the new window.