简体   繁体   中英

Send value from popup Window(Child) to Parent

I want to get a value on popup page, in one textbox, and send it to the parent window, to another textbox.

How to do that ?

Your question is not clear, but from what I deduce, you want to get the value of a textbox from the parent window in your child window.

You can do something like this -

var win = window.open('<Window URL>');
win.contentWindow.SetValueOfTextBox(parentWindowTextBoxValue);

Here win is the instance of the window you have opened.

You'll have to define SetValueOfTextBox function in the new window which you have opened. This function will accept a string and set that value to a textbox on that page. You just have to call that function from the parent window passing the value of the textbox to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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