Example 8 - Appending a value to a textarea.




Form code


<form name="frmExample8" action="">

      <textarea name="araComments" rows="4" cols="80">
This is the text that will initially be displayed in the textarea.
</textarea>
<br/>
<input type="button"
       value="Click to add 'MORE'"
       onclick="
        document.frmExample8.araComments.value=
          document.frmExample8.araComments.value + 'MORE';
       " >
       
</form>