عندما يركز النص ، يختفي النص ، وعندما يكون النص خارج التركيز ، يظهر النص
<! doctype html> <html> <head> <meta charset = "utf-8"> <title> مستند غير محدد </title> </head> <body> <input id = "text" type = "text" value = "click me to" اختفاء "/> var otext = document.getElementByid (" text ") onoff = true ؛ otext.color = "#000" ؛ otext.onfocus = function () {if (onoff) {this.value = "؛ اختفت "؛ onoff = true ؛}} </script> </body> </html>