如何在 iframe 中显示 www.imdb.com?

Cue*_*ero 2 html iframe imdb

我想在 iframe 中显示http://www.imdb.com,但下面的代码不起作用。

<!DOCTYPE html>
<html>
<body>

<iframe src="http://www.imdb.com/" width="400" height="400"></iframe>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

有谁知道原因吗?非常感谢。

Ahm*_*ani 5

原因是 imdb.com 正在发送“X-Frame-Options: SAMEORIGIN”响应标头。此选项可防止浏览器显示未托管在与父页面相同的域中的 iFrame。

请参阅:Mozilla 开发者网络 - X-Frame-Options 响应标头