Like Gary Siu said, use the placeholder attribute. No need to involve JavaScript here if you can help it.Whatever you do, don't put hints in place of actual data in the input boxes, it's bad practice and can confuse and annoy users. Stick with the placeholder attribute and use clear input labels.