Html Bouton change background

Fermé
0Albert0o Messages postés 562 Date d'inscription mardi 15 mars 2011 Statut Membre Dernière intervention 4 novembre 2013 - 12 juin 2012 à 20:24
L0ci Messages postés 110 Date d'inscription mardi 17 avril 2012 Statut Membre Dernière intervention 9 janvier 2013 - 13 juin 2012 à 10:23
Bonjour, j'ai actuellement crée un site, et, mon background étant noir, je voudrais inserer un bouton enfin, plusieurs bouton qui permettrais de choisir son background du site web.
Un grand merci
Cordialement. Alberto.




A voir également:

1 réponse

L0ci Messages postés 110 Date d'inscription mardi 17 avril 2012 Statut Membre Dernière intervention 9 janvier 2013 30
13 juin 2012 à 10:23
Bonjour,

tu peux utiliser ce code pour ton bouton:
<input type="button" onclick="document.body.bgColor='lavender';"
value="Change background color" />

Bien entendu il faut adapter la couleur et la valeur du bouton selon tes besoins.

(http://www.w3schools.com/htmldom/dom_using.asp)
1