我得到了以下error的时候我实现patent search google在iframe。
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)