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.
我在管理窗口方面需要帮助。
如何将对象从父窗口传递到子窗口。
ChildWindow使用打开parentWindow.open()。
ChildWindow
parentWindow.open()
提前感谢
您可以在子窗口中分配一个变量,就像任何其他对象一样:
var myValue = { foo: 'bar' }; var childWindow = window.open("URL_SAME_DOMAIN"); childWindow.Variable = myValue;