How to make a remove frame script in JavaScript?

ⅰ亾dé卋堺 提交于 2019-12-25 03:11:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!