Different ways to watermark html input text



There are many ways to add a watermark text to an input text, which will go when you focus the control or start writing inside.

I will list here some good ways to this behavior:

This is an easy and short way to it just using the onfocus and onblur events of the textbox or input field.

But lets make the code cleaner by geting this text from the server side, which will give us many options such as supporting localization.

 Also you can find online a lot of other ways which will fit in some cases such as the following:

jQuery Watermark

Watermark Input Plugin

TextBoxWatermark (AjaxToolKit)

In-Field Labels jQuery Plugin

This entry was posted in Technical. Bookmark the permalink.