onFocus Clear Form Text Field Element Javascript Snippet Code

Example of a form field text element needing to be cleared onFocus:

Input Code Example: input type='text' value='this is text to clear' onFocus='clear_field(this)'

How to insert your word text inside the form text field element boxes:

We recommend using the free Notepad ++ source code editor.

You can copy the onFocus='clear_field(this)'; code and paste it to all of your form field elements that you need to clear onFocus.

In your form field elements add your own text message value='your text here'

When the visitor clicks on the form field text element boxes, the value='text message' is cleared onFocus.



[ This code example from Clear Form Field Code Snippet page. ]