i\'m trying to write unobtrusive default/placeholder text in input (actually, relatively placed label
over input
, which hides on onFocus
This is how I would do it, without JQuery. It grays out the control when it shows the default text, and allows entering the default text if need be. The "title" tag will fallback to a tooltip for people who disable JavaScript:
EDIT: Cleared up the comments a bit, fixed some IE bugs and made it so it looks for tags with
title
's to make it so different pages have less conversion time rather than individually intitializing the input controls ;-)