Invoking JavaScript code in an iframe from the parent page

后端 未结 17 1836
栀梦
栀梦 2020-11-21 07:00

Basically, I have an iframe embedded in a page and the iframe has some JavaScript routines I need to invoke from the parent page.

Now the o

17条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-21 07:25

    The IFRAME should be in the frames[] collection. Use something like

    frames['iframeid'].method();
    

提交回复
热议问题