Something like this should work:
var textArea = document.getElementById("mytextarea");
var textToAppend = document.createTextNode("Hello, World!");
textArea.appendChild(textToAppend);
EDIT: or, as Walkney suggested, the last two lines can be replaced with:
textArea.value += "Hello, World!";
source
share