Plain syntax for image in the same folder as the page:
Code:
document.body.style.background="url('flowers.jpg') white center no-repeat fixed"
With a relative path (image is one level off of the page's in a folder called 'images'):
Code:
document.body.style.background="url('images/flowers.jpg') white center no-repeat fixed"
With absolute path (image is one level off of the root of the domain in a folder called 'images'):
Code:
document.body.style.background="url('http://www.mydomain.com/images/flowers.jpg') white center no-repeat fixed"
Bookmarks