This little javascript can be used to clear a form’s value when the user clicks on it.
Making a form clear when clicked
Add this code between the <head></head> tags on your page:
<script> function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } </script>
Once done you can now add your forms anywhere on the page and as many as you want like this:
Add this code between the body tags on your page:
<form> <input type="text" value="Enter your e-mail address.." onFocus="clearText(this)"> <input type="text" value="Search this site.." onFocus="clearText(this)"> </form>