1

Simply i want to append some characters to the parent window's textarea.

str="some character" 

window.opener.document.getElementById('id1').value = str;

It changes the parent window's textarea's value to "some character"..But I want to append this text to textarea's value. like,

window.opener.document.getElementById('id1').value.append(str); // not working

But it is not working.

How can I do this?

4

2 回答 2

4

try window.opener.document.getElementById('id1').value += str;

于 2013-04-26T10:46:58.193 回答
0

You can do it as below.

window.opener.document.getElementById('id1').value = 
window.opener.document.getElementById('id1').value + str;
于 2013-04-26T10:49:20.697 回答