If you hit the stop button you will see only one background. I have added a meta tag in my page so you can see what this script would do if you were to hit the reload button. Since it is random you may see the same background twice in a row. Remember to insert your own image names where is says "your image here". Place this in the head of your page.
Here is the code, just copy and paste:
<script language="JavaScript" type="text/javascript">
//!--- hide script from old browsers
var numimage = 9
day = new Date()
z = day.getTime()
x = parseInt(((z - (parseInt(z/1000,10) * 1000))/10)/100*numimage + 1,10)
if (x == (1)){
image=("your image here")
}
if (x == (2)){
image=("your image here")
}
if (x == (3)){
image=("your image here")
}
if (x == (4)){
image=("your image here")
}
if (x == (5)){
image=("your image here")
}
if (x == (6)){
image=("your image here")
}
if (x == (7)){
image=("your image here")
}
if (x == (8)){
image=("your image here")
}
if (x == (9)){
image=("your image here")
}
// end hiding --->
</script>
<script language="JavaScript" type="text/javascript">
document.write('<BODY BACKGROUND="'+ image +'">')</SCRIPT>
<body background="image">
</head>
Notice how the head tag ends after all of the code. The body background tag must be set to "image" to work. But if you view the source code in your browser, "image" is changed to reflect the actual image which replaces it.
All graphics were made by Cathyland. Want to see more? Visit the Graphics Page.
For more applets visit the Javascripts Page.