沃梦达 / 编程问答 / php问题 / 正文

如何在 iframe 中打开谷歌链接?

how to open google links inside iframe?(如何在 iframe 中打开谷歌链接?)

本文介绍了如何在 iframe 中打开谷歌链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 iframe 中打开谷歌搜索.它一直工作到最近,但发生了一些事情.

i am trying to open a google search inside an iframe. it was working until recently but something happened.

这可以在这里测试:http://jsfiddle.net/patrioticcow/xTjyX/

我还在链接的末尾添加了 &output=embed,但看起来没有帮助.

i also added &output=embed at the end of the link, but it looks like it doesn't help.

在 chrome 中我得到:拒绝显示文档,因为 X-Frame-Options 禁止显示.但它也不适用于 Mozilla.

in chrome i get: Refused to display document because display forbidden by X-Frame-Options. but it doesn't work in Mozilla also.

有什么想法吗?

谢谢

推荐答案

X-Frame 选项是由您尝试嵌入 iframe 的页面的网络服务器发送的标头.它基本上告诉浏览器不允许将页面嵌入到 iframe 中.看看 https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header 更详细的描述.

The X-Frame option is a header sent by the webserver of the page you are trying to embed into the iframe. It basically tells the browser not to allow embedding the page in an iframe. Have a look at https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header for a more detailed description.

显然,Google 不希望您将其搜索结果嵌入到 iframe 中.

Obviously Google does not want you to embed it's search results into an iframe.

这篇关于如何在 iframe 中打开谷歌链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在 iframe 中打开谷歌链接?

基础教程推荐