1
내에 위치한 요소에 의해 부모 iframe 요소를 가져옵니다 :다음과 같은 HTML을 가정 iframe이
<div>
<iframe src="..">
<!-- The following would be the content of the iframe -->
<html><head></head><body>
<span>I'm the node</span>
</body></html>
</iframe>
</div>
그리고 당신은 변수 iframeNode
가 iframe을 내 <span>
요소를 포함해야합니다. 스크립트 컨텍스트가 부모 창입니다.
상위 iframe 요소 얻을 것입니다 방법 :이 노드에 의해
<iframe src="..."></iframe>
를? 이론적으로
는 :
var iframe = iframeNode.myParentIframeElementInTheParentScope;