我有元素的下一個結構:訪問容器(iframe內的iframe)
<div class="container">
<iframe class="outer">
..
<iframe class="inner">
actual markup with scripts here
</iframe>
</iframe>
</div>
使用純JavaScript,我已經meneged出去「內」的iframe到外之一:
//this is HTML tag of ".outer" iframe
var parent = window.parent.document.getElementsByTagName('html')[0];
但我仍然需要到「.container」元素才能操作它。 任何人都可以告訴我如何從「.inner」元素內的腳本獲得「.container」元素??
謝謝。現在玩跨域請求:) – Kamilius