Posted By

Victoor on 02/12/08


javascript forms textarea

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Write Text in a TextArea

 / Published in: JavaScript

  1. <head>
  2. <script language="javascript" type="text/javascript">
  3. function addtext(text) {document.form.textarea.value = document.form.textarea.value+= text;}
  4. </script>
  5. </head>
  7. <body>
  8. <form action="" method="" name="form">
  9. <textarea name="textarea" rows="" cols="" wrap="wrap"></textarea>
  10. </form>
  11. <a href="javascript:addtext('Text to add');">Add text</a>
  12. </body>

Report this snippet  

You need to login to post a comment.