iframe 页面内的按钮不起作用。 (打开 Paypal 购物车页面的 PayPal 按钮)
带 iframe 的页面:https://www.keymarket.de/microsoft-access-2010-p-33-checkout.html
原网页:https://payivy.com/v/Windows%207%20Professional%20SP1%20Key
原始页面上的按钮有效,但 iframe 页面上的按钮没有响应。
最佳答案
当我尝试它时,我在控制台收到以下错误消息:
Refused to display 'yoururl' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
您不能在 iframe 上设置 X-Frame-Options
。它是由您从中请求资源的域设置的响应 header ,因此在您的情况下是 PayPal。
在这种情况下,他们将 header 设置为 SAMEORIGIN,这意味着他们已停止在自己域之外的 iframe 中加载资源。
要了解有关 X-Frame-Options
的更多信息,请查看此链接:
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
另见此处:
关于html - iframe 内的按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28960043/