我,当我实现iframe
patent search google
以下error
。错误:在一个框架,因为它设置“X-框架 - 选项”到“SAMEORIGIN”
in a frame because it set 'X-Frame-Options' to 'sameorigin'.
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;
}
<h2>Google Patent Search</h2>
<form>
<p>Paste your content</p>
<textarea id="patent_content"></textarea>
<input type="button" id="go_search" value="go" />
</form>
<div id="result">
</div>
请帮我解决这个问题。
在此先感谢。
错误: 在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
错误: 在Mozilla中
Load denied by X-Frame-Options: https://patents.google.com/?q=dsfsdfsd&embedded=true does not permit cross-origin framing.
可能的重复:https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome – Ved
@我已经尝试了不同的东西。请检查我的代码... –