阻止网页从框架中逸出 [英] Block a web page from escaping from the frame

查看:57
本文介绍了阻止网页从框架中逸出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.webreference.com/js/column36/escaping.html [ ^ ]

有什么方法可以阻止网页从框架中逸出?看一下链接,它描述了我对逃生的意思.我试图将Facebook放在页面的框架中,但是Facebook使用的是以下版本:

http://www.webreference.com/js/column36/escaping.html[^]

Hi, Is there any way to block a web page from escaping from the frame? Look at the link, it describes what i mean with escape. I am trying to get Facebook in a frame on my page but Facebook is using some version of the:

<SCRIPT LANGUAGE="JavaScript">
<!--

if (window != top) top.location.href = location.href;

// -->
</SCRIPT>




我想这就是不可能将Facebook放入框架的原因.
该代码来自 http://www.facebook.com/presence/popout.php [ ^ ]




I guess that this is the thing that makes it impossible to put Facebook in a frame.

The code is from http://www.facebook.com/presence/popout.php[^]

<script type="text/javascript">/* <![CDATA[ */if (top != self) { try { if (parent != top) { throw 1; } var disallowed = ["apps.facebook.com","\/pages\/"]; href = top.location.href.toLowerCase(); for (var i = 0; i < disallowed.length; i++) { if (href.indexOf(disallowed[i]) >= 0) { throw 1; } } } catch (e) {setTimeout(function() {var fb_cj_img = new Image(); fb_cj_img.src = "http:\/\/error.facebook.com\/common\/scribe_endpoint.php?c=si_clickjacking&m=on%09&t=2501";}, 5000); window.document.write("<style>body * { display:none !important; }<\/style><a href=\"#\"  önclick=\"top.location.href=window.location.href\" style=\"display: block !important; padding: 10px\"><i class=\"img spritemap_2rry0p sx_0fdace\" style=\"display:block !important\"><\/i>G\u00e5 till Facebook.com<\/a>");/* 51tSedCe */ }}/* ]]> */</script>




önclick= onclick




önclick= onclick

推荐答案

这意味着Facebook不想让其应用程序运行框架...
It means facebook doesn''t want to have their application run framed...


这篇关于阻止网页从框架中逸出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆