Background Image

A cookie is used to remember which background image is displayed.

Select a background from the following options and then refresh the page

For testing purposes you can Delete The Cookie, when you refresh the page the default background image, background 1, will be shown.

The above example shows the background of a div changing when the page loads by referencing the div

document.getElementById("id").style.backgroundImage="imgArray("+[num]+")"

To change the background of the page you reference the body of the page

document.body.style.backgroundImage="imgArray("+[num]+")"

The following script example is set to change the background image of the page