2
부모 jquery의 iframe 콘텐츠에 액세스하고 싶습니다.부모 jquery의 iframe 콘텐츠에 액세스
상위 페이지에 다음 코드를 추가했습니다.
$(document).ready(function() {
$('#MyIframe').load(function() {
$('#MyIframe').contents().find('body').html('Hey, i`ve changed content of <body>! Yay!!!');
});
});
다른 사이트에서 내 iframe이 페이지 로딩 그리고 오류를 나에게 당신은 iframe 대응의 onload
을 제거하면 코드가 작동
iFrame은 당연히 동일한 도메인의 콘텐츠를 표시합니까? – adeneo