How to access parent Iframe from JavaScript

后端 未结 9 1514
梦毁少年i
梦毁少年i 2020-11-22 07:50

Well, I have an IFrame, which calls a same domain page. My problem is that I want to access some information from this parent Iframe from this called page (from JavaScript).

9条回答
  •  自闭症患者
    2020-11-22 08:30

    Maybe just use

    window.parent
    

    into your iframe to get the calling frame / windows. If you had multiple calling frame, you can use

    window.top
    

提交回复
热议问题