简体   繁体   English

window.open对象更改父元素?

[英]window.open object change parent element?

I'm not the most javascript savy. 我不是最懂JavaScript的人。 I've seen posts for children windows getting parent values but not vice versa. 我见过有关子窗口获取父值的帖子,反之亦然。

Basically, I want to invoke a window object with window.open. 基本上,我想使用window.open调用一个window对象。 After some user input is entered in the new window, I want to stuff that input into the original window that invoked the window.open. 在新窗口中输入一些用户输入后,我想将输入内容填充到调用window.open的原始窗口中。

The only ways I can think to do this are messy. 我认为做到这一点的唯一方法是混乱的。 I don't need any code examples. 我不需要任何代码示例。 But if it is possible and you can example it to me I would be grateful. 但是,如果有可能,您可以向我举例说明,我将不胜感激。

当您打开新窗口时, window.opener包含对父窗口(即打开该窗口的窗口)的引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM