How to embed google iframe?

让人想犯罪 __ 提交于 2019-12-11 05:28:56

问题


Google seems to be blocking websites which use iframes. Of course I'm using google with its trademark and embedded it in an iframe. But for some reason it never works.

Anyone knows how to bypass it?

http://jsfiddle.net/EgurZ/

Thanks


回答1:


You cannot bypass it in modern browsers in any way, they simply refuse to display websites in iframe that send a X-Frame-Options header with DENY (or SAMEORIGIN is already enough). It doesn't even come down to javascript.




回答2:


You can use this link instead of https://google.com/ , it works pretty good:

https://www.google.com/search?igu=1

With specific word you can use this link:

https://www.google.com/search?igu=1&ei=&q=YOUR+WORD

Than iframe should looks as this:

<iframe src="https://www.google.com/search?igu=1"></iframe>


来源:https://stackoverflow.com/questions/8139474/how-to-embed-google-iframe

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