Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Tutorials Zone! => Internet webmaster computer programming technology tips and tricks => Java Script Tutorials => Topic started by: ben2ong2 on October 04, 2006, 03:58:44 AM

Title: Background effects - A cool JavaScript tip
Post by: ben2ong2 on October 04, 2006, 03:58:44 AM

Here is a cool Javascript tip that will change the background color over time. With a few modifications, you can use this tip to display all the colors of the rainbow in the background. This tip describes how to create a fading web page background.

Using the bgColor property of the JavaScript window object, we can change the background color. Here is the code:

var c = new Array("00", "11", "22", "33", "44", "55",
"66", "77", "88", "99", "AA", "BB", "CC", "DD", "EE", "FF");

x = 0;

function bg_eff()
   {
   col_val = "#FFFF" + c