Form Input – Clearing the Values of the Form Fields

A company you can trust

To clear text from a textarea or input text on a mouse click, you have to use some javascript.

Example (click in the box to see the text clear):

The codes used for this is as follows

<form name=”myform”>
<textarea name=”mytext” cols=”30″ rows=”5″ onclick=”document.myform.mytext.value=”;”>
This text will disappear when you click the textarea with the mouse</textarea>
</form>