Hi, this JS code adds text to the textarea from links with a set value. Is it possible for the links to toggle the target text (add/remove) yet still append if the other link is clicked?
Thanks.
Code:<html> <head> <script> function text(t){ a = document.getElementById('tarea'); a.value += t; } </script> </head> <body> <textarea name="tarea" id="tarea"></textarea> <br><br> <a href="javascript:text('this is some text ')">Click Me</a> <a href="javascript:text('this is some more text ')">Click Me 2</a> </body> </html>



Reply With Quote

Bookmarks