»
EnglishFrenchVietnamese

Print - Black to white background color - JavaScriptBank.com

Full version: jsB@nk » Background » Black to white background color
URL: https://www.javascriptbank.com/black-to-white-background-color.html

Black to white background color © JavaScriptBank.comA fading background script that fades from black to white as someone enters the page.

Full version: jsB@nk » Background » Black to white background color
URL: https://www.javascriptbank.com/black-to-white-background-color.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*/<!--         var increase = "true" var selectedhex = 0 var selectedhexb = 0 var hexadecimal = new Array()  hexadecimal[0] = "0"  hexadecimal[1] = "1"  hexadecimal[2] = "2"  hexadecimal[3] = "3"  hexadecimal[4] = "4"  hexadecimal[5] = "5"  hexadecimal[6] = "6"  hexadecimal[7] = "7"  hexadecimal[8] = "8"  hexadecimal[9] = "9"  hexadecimal[10] = "a"  hexadecimal[11] = "b"  hexadecimal[12] = "c"  hexadecimal[13] = "d"  hexadecimal[14] = "e"  hexadecimal[15] = "f" function fade() {  if(increase == "true") {   selectedhex++;    if(selectedhex == 15 && selectedhexb < 15) {     selectedhex = 0;     selectedhexb++;    }    if(selectedhex == 16 && selectedhexb == 15) {     increase = "false";    }  }  if(increase == "false") {   selectedhex--;    if(selectedhex == -1 && selectedhexb != 0) {     selectedhex = 15;     selectedhexb--;    }    if(selectedhex == 0 && selectedhexb == 0) {     increase = "true";    }  }  document.bgColor = hexadecimal[selectedhexb] + hexadecimal[selectedhex] +                     hexadecimal[selectedhexb] + hexadecimal[selectedhex] +                     hexadecimal[selectedhexb] + hexadecimal[selectedhex];  setTimeout("fade()",1)  }//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


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