Jag brukar använda följande kod med jQuery:
Kod:
$('input.field').focus(function() {
if (this.value == this.defaultValue) { this.value = ''; }
}).blur(function() {
if (this.value == '') { this.value = this.defaultValue; }
});
Kod:
<input class="field" type="text" value="Ange din e-postadress" />