iAlex
Junior Member
Posts: 73
|
Post by iAlex on Apr 11, 2008 0:50:27 GMT -5
This will allow you to have random backgrounds displayed on your board. Edit the red text with either a colour or image URL. One of these will then be randomly selected when the pages is refreshed. You can have a combination of background colours and background images.
Global Header.
Cross Browser.
Open Source.
<script type="text/javascript"> <!--
/*Open Source*/
var iBackground_List=[ "FF0000", "http:/www.imagehost.com/image.gif", "Colour or URL", "Colour or URL" //No comma on last line ];
var iRandom_Number=iBackground_List[(Math.floor(Math.random()*iBackground_List.length))]; var iBody_Background=document.body.style; (iRandom_Number.match(/http|www/))? iBody_Background.backgroundImage='url('+iRandom_Number+')' : iBody_Background.backgroundColor=iRandom_Number;
//--> </script>
|
|