par
datesta » 29 juin 2006, 10:18
<input id="mot_cle" type="text" name="mot_cle" value="Recherche web..." onfocus="this.className='focus';" onblur="this.className='normal';"/>
tu rajoute onfocus et onblur...
onfocus c'est quand l'input est utilisé et l'autre c'est quand ça l'est plus !
ensuite il manque plus qu'a modifier ton CSS en ajoutant :
#mot_cle .focus { /*** Mise en avant des champs en cours d'utilisation ***/
background: #aaaaaa; /* fond gris */
color: black;
}
#mot_cle .normal { /*** Retour à l'état normal après l'utilisation ***/
background: white;
color: #999999;
}
voila en esperant t'avoir aidé

[php]<input id="mot_cle" type="text" name="mot_cle" value="Recherche web..." onfocus="this.className='focus';" onblur="this.className='normal';"/>[/php]
tu rajoute onfocus et onblur...
onfocus c'est quand l'input est utilisé et l'autre c'est quand ça l'est plus !
ensuite il manque plus qu'a modifier ton CSS en ajoutant :
[php]
#mot_cle .focus { /*** Mise en avant des champs en cours d'utilisation ***/
background: #aaaaaa; /* fond gris */
color: black;
}
#mot_cle .normal { /*** Retour à l'état normal après l'utilisation ***/
background: white;
color: #999999;
}
[/php]
voila en esperant t'avoir aidé :)