https://dev.webpages.dk/  
 
Clear textfield on click
How to clear a textfield on a mouse click:

This small snippet les you have some default text in a textfield, and clear it on a mouse click. The bonus snippet that you get here is that the text from the textfield will change when clicked upon.
Try the examples here on the front page to the right.

 Navigate to other page:

 You know these textfields that will clear the content when you click in it.
You can have a default text in it, like *Enter you name here", and then clear it when clicked. Or you can change this so when clicked it will write in some completly different text.



 Javascript

Here are the two examples.
I have removed the styling. Make your own.
If you need to know more about styling of FORM Fields, find how to do f.eks here where I have made some complete examples.


<input type="text" onfocus="this.value=''" value="Click me to watch me disappear...">

<input type="text" onfocus="this.value='I changed the text'" value="Click me to watch me change...">
Icons made by Freepik from www.flaticon.com This page is about how to clear a FORM Field by a click. The other box will replace the default text with some other.
14:50:53