voici le code que j'ai pour un champ text:
Code : Tout sélectionner
<input type="text" name="mot" value="recherche" onClick="this.value=''" />
Code : Tout sélectionner
<input type="text" name="mot" value="recherche" onClick="this.value=''" />Code : Tout sélectionner
<input type="text" name="mot" value="recherche" onfocus="if(this.value=='recherche') this.value='';" onblur="if(this.value=='') this.value='recherche';">
Code : Tout sélectionner
<textarea name="mot" onfocus="if(this.value=='recherche') this.value='';" onblur="if(this.value=='') this.value='recherche';">recherche</textarea>