เมื่อข้อความมุ่งเน้นข้อความจะหายไปและเมื่อข้อความไม่ได้โฟกัสข้อความจะปรากฏขึ้น
<! doctype html> <html> <head> <meta charset = "utf-8"> <title> unt document </title> </head> <body> <input id = "text" type = "text" value = "คลิกฉันเพื่อหายไป" onoff = true; otext.color = "#000"; otext.onfocus = function () {ถ้า (onoff) {this.value = ""; this.color = "red"; onoff = false;}} otext.onblur = function () หายไป "; onoff = true;}} </script> </body> </html>