问题
I am making websites I refer to from my site load up in a frame (similar to google images). But I also want to give users the ability to break out of that frame. Like with google image's "Remove Frame" link at the bottom right corner of their frame. How can I do this possiblyusing Javascript?
回答1:
Like this:
top.location = "URL of framed page";
Alternatively, you can make a regular <a>
tag with target="_top"
.
来源:https://stackoverflow.com/questions/2618077/how-to-make-a-remove-frame-script-in-javascript