graphic-javascript-effect-background-color-effect.htm / htm
<!-- TWO STEPS TO INSTALL BACKGROUND COLOR-CHANGE: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin // Copyright 2001 by www.CodeBelly.com // Please do *not* remove this notice. var backColor = new Array(); // don't change this // Enter the colors you wish to use. Follow the // pattern to use more colors. The number in the // brackets [] is the number you will use in the // function call to pick each color. backColor[0] = '#FF0000'; backColor[1] = '#00FF00'; backColor[2] = '#FFC0C0'; backColor[3] = '#FFFFFF'; // Do not edit below this line. function changeBG(whichColor){ document.bgColor = backColor[whichColor]; } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <!-- Example One -- changing bg color with mouseOver. Set the number in the () in the changeBG() function to the number of the color in the brackets in the backColor[] array to select a given color.
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.