Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用新的跨窗口消息传递 api。我用 window.open 创建了一个新窗口,我可以向这个新窗口发送消息。我想做相反的事情,并能够从新窗口向原始窗口发送消息。
如何获取原始窗口的对象?
您可以window.opener在弹出窗口中使用来访问开启器窗口。
window.opener