/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<head> <script language="javascript" type="text/javascript"> function addtext(text) {document.form.textarea.value = document.form.textarea.value+= text;} </script> </head> <body> <form action="" method="" name="form"> <textarea name="textarea" rows="" cols="" wrap="wrap"></textarea> </form> <a href="javascript:addtext('Text to add');">Add text</a> </body>