Ver original<html> <head> <script type="text/javascript"> function texto (){ document.getElementById ("t").value = "sfd"; } </script> </head> <body> <textarea id="t"></textarea> <input type="button" value="clic" onclick="texto ();"/> </body></html>