1 2 3 4 5 | < script > function blank(a) { if(a.value == a.defaultValue) a.value = ""; } function unblank(a) { if(a.value == "") a.value = a.defaultValue; } </ script > < input type = "text" value = "email goes here" onfocus = "blank(this)" onblur = "unblank(this)" /> |
This post was updated using code found here, which I think works a little nicer.
1 2 3 4 5 | < script > function blank(a) { if(a.value == a.defaultValue) a.value = ""; } function unblank(a) { if(a.value == "") a.value = a.defaultValue; } </ script > < input type = "text" value = "email goes here" onfocus = "blank(this)" onblur = "unblank(this)" /> |
This post was updated using code found here, which I think works a little nicer.