clevert
08-11-2002, 01:35 AM
<script>
Hi, I'm trying to add more backgrounds to this random background generator. I tried several combinations of repeating commands but nothing. I would be so very grateful for any leads.
here's the code
/*Random Background Image-
By JavaScript Kit (www.javascriptkit.com)
More free JavaScripts here!
*/
var backgr1="BGbark.jpg"
var backgr2="BGcloud.jpg"
var backgr3="BGforestspirit.jpg"
var cur=Math.round(4*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>
Hi, I'm trying to add more backgrounds to this random background generator. I tried several combinations of repeating commands but nothing. I would be so very grateful for any leads.
here's the code
/*Random Background Image-
By JavaScript Kit (www.javascriptkit.com)
More free JavaScripts here!
*/
var backgr1="BGbark.jpg"
var backgr2="BGcloud.jpg"
var backgr3="BGforestspirit.jpg"
var cur=Math.round(4*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>