我,當我實現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
@我已經嘗試了不同的東西。請檢查我的代碼... –