简体   繁体   English

iframe“ src”属性问题

[英]The iframe “src” attribute issue

I have make the small iframe and link to google.com but it is no working my code is 我已经制作了小型iframe并链接到google.com,但我的代码无法正常工作

<iframe width="560" height="315"  src="https://www.google.com.pk/" frameborder="0" allowfullscreen></iframe>

Errors 失误

Refused to display 'https://www.google.com.pk/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
www.google.com.pk/ Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE

You are entering wrong url. 您输入的网址错误。 Please refer below code. 请参考下面的代码。 It may help you. 它可能会帮助您。

<iframe width="560" height="315"  src="https://www.google.co.pk/" frameborder="0" allowfullscreen></iframe>

Your url should be: " https://www.google.co.pk ". 您的网址应为:“ https://www.google.co.pk ”。 Yo have entered: https:www.google.com.pk" It is invalid url. 您输入了:https:www.google.com.pk“。这是无效的网址。

Lots of websites, Google included, block themselves from being displayed in iframes for security reasons. 出于安全原因,包括Google在内的许多网站都阻止自己在iframe中显示。

See this description for X-Frame-Options for how it works 有关X-Frame-Options的工作原理, 请参见此说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM