标签: google-patent-search

错误:在框架中,因为它将“X-Frame-Options”设置为“sameorigin”

我得到了以下error的时候我实现patent search googleiframe

in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Run Code Online (Sandbox Code Playgroud)

in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Run Code Online (Sandbox Code Playgroud)
document.getElementById("go_search").onclick = function() {
  myFunction();
};

function myFunction() {
  var patent_content = document.getElementById("patent_content").value;

  var html_content = '<iframe crossorigin="anonymous" src="https://patents.google.com/?q=' + patent_content + '&embedded=true" height="200" width="300"></iframe>';
  document.getElementById("result").innerHTML = html_content;
}
Run Code Online (Sandbox Code Playgroud)

请帮我修复它。

提前致谢。

错误: 在 Chrome 中

patent.html:1 Refused to display 'https://patents.google.com/?q=fghfhfghfg' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
patent.html:24 GET https://patents.google.com/?q=fghfhfghfg net::ERR_BLOCKED_BY_RESPONSE …
Run Code Online (Sandbox Code Playgroud)

javascript google-patent-search

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

google-patent-search ×1

javascript ×1