<div style='width:17%;height:100%;background-color:red; z-index:2;float:left'>
<iframe id='childPage' src="/image_jsp/charts.jsp" width="100%" height="100%" frameborder="1" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div>
JQuery調用iframe子頁面函數/對象的方法例子:父頁面有個ID爲childPage的iframe,iframe連接b.html,
該頁面有個函數test在父頁面調用b.html的test方法爲:
$("#childPage")[0].contentWindow.test();
子頁面調用父頁面的test方法爲:
window.parent.test();