我如何< iframe> Gmail吗? [英] How can I <iframe> Gmail?

查看:120
本文介绍了我如何< iframe> Gmail吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Gmail可能会采取一些安全措施来防止这种情况发生,但我确实需要将Gmail放入一个元素中。

I know that Gmail might put some security measures in place to prevent this, but I really need to put Gmail inside an element.

t work:

The two following methods don't work:

<object type='text/html' data='http://mail.google.com/'></object>

<iframe src='http://mail.google.com/' frameborder=0 style='width:322px; height:480px;'></iframe>

是否有其他方法?

Are there any other ways?

推荐答案

你不能。像大多数Google的其他Web服务一样,GMail设置HTTP标头:

You cannot. GMail, like most of Google's other web services, sets the HTTP header:

X-Frame-Options: SAMEORIGIN

不允许他们的网站被除GMail本身以外的任何网站构成。

which disallows their site from being framed by any site other than GMail itself.

这篇关于我如何&lt; iframe&gt; Gmail吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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