<!DOCTYPE html> <html> <body> <textarea id="t"></textarea> <script> document.getElementById("t").appendChild(document.createTextNode("abcd")); document.getElementById("t").appendChild(document.createTextNode("efgh")); </script> </body> </html>