Cuando el texto se enfoca, el texto desaparece, y cuando el texto está fuera de foco, el texto aparece
<! Doctype html> <html> <fead> <meta charset = "utf-8"> <title> un documento titulado </title> </head> <body> <input id = "text" type = "text" valor = "Haga clic en Me desaparecerá"/> <script> var oText = document.getEmementByid ("text"); var val onOff = true; oText.color = "#000"; oText.onfocus = function () {if (onoff) {this.value = ""; this.color = "rojo"; onoff = false;}} otoxt.onblur = function () {) desaparecer "; onoff = true;}} </script> </body> </html>