Previous Message
Next Message

Random background color to a DIV

Sent by Jens Peter Bregnballe on 27 February 2006 12:12


Hi Paul !
Some javascript should do the trick
<script>
//Enter list of bgcolors:
var bgcolorlist=new Array("#afafaf", "#1f1f1f", "#80ff80", "#eafeaf",
"#f7f7f7", "#f8f8f8", "#ffffff", "#dddddd")
yourrandombackgroundcolordiv.bgColor=bgcolorlist[Math.floor(Math.random()*bg
colorlist.length)]
</script>
 
Jens Peter Bregnballe
 
[EMAIL-REMOVED]
 
 
 
 
 
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: