Javascript examples for DOM HTML Element:Textarea
Grabbing value and appending to textarea with Javascript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function doMagic(){//w ww. j a v a 2s . c o m var homeTown = document.getElementById("hometown").value; document.getElementById("comment").value += homeTown; } </script> </head> <body> <input type="text" name="hometown" id="hometown" size="22"> <textarea name="comment" id="comment"></textarea> <input type="submit" onClick="doMagic();"> </body> </html>