
How I change the BG Color?
Some people have asked how I change the background colour on my websites… Well there are two ways. I uses Dynamic linking to separate style-sheets here, on brennanmceachran.com, and on every other site I just use javascript. Below are the codes
In PHP:
In Javascript:
var colors = 8;
var randomcolor= Math.round(random * (colors-1)) + 1;bgs = new Array
bgs[1] = “3333cc” //blue
bgs[2] = “9933cc” //purple
bgs[3] = “cc3333″ //red
bgs[4] = “33cc33″ //green
bgs[5] = “99cc33″ //lime green
bgs[6] = “cccc33″ //yellow
bgs[7] = “cc9933″ //orange
bgs[8] = “cc6633″ //orange-red
var bg = bgs[randomcolor];
document.write(‘<body bgcolor=”#’ + bg + ‘”>’)
Here’s how I do it with javascript. There are more ways of doing something like this… but I like to change up the colors all the time and this way allows me to quickly do so.


