가능한 중복 :
Load external content using AJAX여러 JQuery와 하중() 이벤트
나는 매우 JQuery와 프로그래밍에 대한 새로운 별도의 div의에 다른 웹 페이지를로드하려고 해요,하지만 난 것 캔트 그것을 작동 시키려면, 내가 뭘 잘못하고 있니?
<div data-role="page" id="main">
<div data-role="header" data-position="fixed">
<h1>Search</h1>
</div>
<div data-role="content">
<h2>define your choice</h2>
<p>Go to: <a href="#google">google</a></p>
<p>Go to: <a href="#bing">bing</a></p>
</div>
<div data-role="footer" data-position="fixed">
<h4>Footer</h4>
</div>
</div>
<!-- Start of second page -->
<div data-role="page" id="GameFart" data-add-back-btn="true">
<div data-role="header" data-position="fixed">
<h1>google</h1>
</div>
<div data-role="content">
<div id="google">
</div>
<div data-role="footer" data-position="fixed">
<h4>Footer</h4>
</div>
</div>
<!-- Start of third page -->
<div data-role="page" id="GameSpecials" data-add-back-btn="true">
<div data-role="header" data-position="fixed">
<h1>bing</h1>
</div>
<div data-role="content">
<div id="bing">
</div>
<div data-role="footer" data-position="fixed">
<h4>Footer</h4>
</div>
</div>
허용하지 않는 한 Ajax로 외부 도메인에 액세스하는 것은 불가능합니다. https://en.wikipedia.org/wiki/Same_origin_policy를 참조하십시오. Google과 Bing은 다른 사이트에 퍼져있는 사이트가 마음에 들지 않습니다 (사용자가 해당 임베드라고 부를 수있는 경우). –
felix의 말에 따르면 Google은 [X- 프레임 옵션 헤더] (https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options?redirectlocale=en-US&redirectslug=The_X-FRAME)를 사용합니다. -OPTIONS_response_header), 클라이언트 측 스크립팅으로 프레임을 구성하거나 컨텐츠를 얻을 수 없습니다. – adeneo