Friday, January 16, 2009

Javascript to show and hide input default text

Here is a script that I got from one of the sites I worked on.
It has come very handy and re-usable in other sites.

Just add the class 'default_value' to your Textbox or input controls <input class="'default_value' /> and that's it. When you click on the textbox the default text will disappear. If you don't enter any value on blur the default value will be displayed in the input again.



No comments:

Post a Comment