Home » Tutorials » Other » Javascript
| Some very useful things in web design and web-usability are the ones which are extremely easy to implement, for example to implement this auto-clear feature in your form it just takes you to insert only a line of code. Example |
So this is the code you should be inserting to every field that you want to auto-clear when the user clicks or when the field is onFocus state:
onFocus="this.value=''"
Here is how it will look like inside your form code:
<form>
<input type="text" onFocus="this.value=''" value="Your Name">
</form>
|
 |
|