Saturday, March 6, 2010

Random colour on web page

//Posted By Suresh Chand
//Paste this code in head section in script section



//Enter list of bgcolors:
var bgcolorlist=new Array("#DFDFFF", "#FFFFBF", "#80FF80", "#EAEAFF", "#C9FFA8", "#F7F7F7", "#FFFFFF", "#DDDD00")

document.body.style.background=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]

No comments:

Post a Comment