var t = document.getElementById('ID');t.onfocus = hideText;t.onblur = showText;function hideText() { if(this.value == this.defaultValue) { this.value = ''; }}function showText() { if(this.value == '') { this.value = this.defaultValue; }}
Login to post response