如何显示网页嵌套在div? [英] How to show web page nested in div?
本文介绍了如何显示网页嵌套在div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有简单的HTML代码,
I have simple HTML code,
<div id="overlay">
<div>
<p>Content you want the user to see goes here.</p>
Click here to [<a href='#' onclick='overlay()'>close</a>]
<div>
<object type="text/html" data="http://google.com"></object>
</div>
</div>
</div>
我得到错误,
此内容无法显示在框架中
This content cannot be displayed in a frame
如何在div中显示网页?
How to show webpage inside div?
推荐答案
www.google.com 和其他网站使用 X-Frame-Options HTTP标头< a>指定嵌入只允许来自相同的原点:
www.google.com and other sites use a X-Frame-Options HTTP header that specifies that embedding is only allowed from the same origin:
x-frame-options:SAMEORIGIN
浏览器尊重此标题并阻止您嵌入网站
Browsers respect this header and prevent you from embedding the site
这篇关于如何显示网页嵌套在div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文