How to pass data to parent window from popup window?

后端 未结 2 431
無奈伤痛
無奈伤痛 2021-02-07 03:02

How can I pass some data or call a function on the parent window from a popup window?

The user will click a link which will open a popup on the same website, once he is

2条回答
  •  鱼传尺愫
    2021-02-07 03:52

    The window.opener object is what you're looking for, used it from within your popup like so to call the a function of the parent window:

    window.opener.yourFunc() 
    

提交回复
热议问题