1

I have a pop up window which user can select files and then it will alert the selected image's URL. But I need to do more than that.

I am looking for a way to insert the URL to the parent window's input element.

window.opener.document.write(url);

This will overwrite the parent window's content. But I need to add the URL to special input element in parent window.

I was just thinking what if this literally works !

window.opener.document.getElementById("image").write(url);

Thanks in advance.

4

1 回答 1

6
window.opener.document.getElementById("image").value = url;
于 2012-05-11T19:09:30.993 回答