Call parent Javascript function from inside an iframe

后端 未结 3 676
眼角桃花
眼角桃花 2020-12-13 00:37

I have a iframe (in my domain), that iframe has a file iframe.js.

My parent document has a file parent.js.

I need to call a functio

3条回答
  •  無奈伤痛
    2020-12-13 01:09

    Try just parent.myfunction(). Also be 100% sure that the parent.js is included in your parent document.

提交回复
热议问题