JavaScript window.opener call parent function

后端 未结 2 2067
情话喂你
情话喂你 2020-12-09 18:18

I am trying to call a javascript function defined in a parent from a child window. I have two files like this:

Parent:



<         


        
2条回答
  •  感动是毒
    2020-12-09 18:44

    Ensure you are accessing this via http:// so the Same origin policy passes and you can access opener from the child. It won't work if you're just using file://.

提交回复
热议问题