»
AnglaisFran�aisVietnamien

Imprimer - Couleur de fond aléatoire au bout de 5 sec - JavaScriptBank.com

Version compl�te: jsB@nk » Arrière-plan » Couleur de fond aléatoire au bout de 5 sec
URL: https://www.javascriptbank.com/random-background-color-after-5-sec.html

Couleur de fond aléatoire au bout de 5 sec © JavaScriptBank.comCet JavaScript changements couleur de fond après chaque 5 secondes.

Version compl�te: jsB@nk » Arrière-plan » Couleur de fond aléatoire au bout de 5 sec
URL: https://www.javascriptbank.com/random-background-color-after-5-sec.html



JavaScript
<script language="javascript">/*     This script downloaded from www.JavaScriptBank.com     Come to view and download over 2000+ free javascript at www.JavaScriptBank.com*/<!-- Start of JavaScript code --------function setbackground(){    window.setTimeout( "setbackground()", 5000); // 5000 milliseconds delay    var index = Math.round(Math.random() * 9);    var ColorValue = "FFFFFF"; // default color - white (index = 0)     if(index == 1)        ColorValue = "FFCCCC"; //peach    if(index == 2)        ColorValue = "CCAFFF"; //violet    if(index == 3)        ColorValue = "A6BEFF"; //lt blue    if(index == 4)        ColorValue = "99FFFF"; //cyan    if(index == 5)        ColorValue = "D5CCBB"; //tan    if(index == 6)        ColorValue = "99FF99"; //lt green    if(index == 7)        ColorValue = "FFFF99"; //lt yellow    if(index == 8)        ColorValue = "FFCC99"; //lt orange    if(index == 9)        ColorValue = "CCCCCC"; //lt grey    document.bgColor=ColorValue;}// -- End of JavaScript code -------------- --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onload=setbackground();></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->