Javascript examples for DOM HTML Element:Textarea
You can create a <textarea> element by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <script> function myFunction() {/*w ww . j a va2 s . c o m*/ var x = document.createElement("TEXTAREA"); var t = document.createTextNode("test test test."); x.appendChild(t); document.body.appendChild(x); } </script> </body> </html>