Sometimes the best way to hint what must be entered into a textbox is to put some text in the textbox. This is also referred to as a textbox watermark.
Add this to the
<head> section of your HTML document:
classattribute on your
inputelement to be
hintTextbox. For example:
Here are a collection of textboxes. Experiment with clicking in, tabbing between and setting then deleting values.
This script may not behave as expected when forms are pre-populated with values that are not hints,
perhaps by a server-side script. In such cases, the server's value would be treated as a hint
(i.e. appearing grey and disappearing when focussed). Do not set the class name to
for such fields.
hint-textbox.js - right-click and choose save as