同一页面中两个iframe之间互相调用方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cxws110/article/details/88644514

在同一个页面中存在两个iframe,需要这两个页面互相调用

<iframe id="hkList" name="hkListiframe" src="hkList.ht" frameboder="0" height="600" width="100%"></iframe>
<iframe id="hkFp" name="hkFpiframe" src="hkFp.ht" frameboder="0" height="600" width="100%"></iframe>

需要在JS中书写的语句是:

window.parent.document.getElementById("hkFp").contentWindow.另外一个iframe中的方法;
     

猜你喜欢

转载自blog.csdn.net/cxws110/article/details/88644514