function borraInput(){ document.form1.titulo.value = ''; } <input type="text" name="titulo" value="tu mensaje" onfocus="borraInput()">