Changing background images
Changing background images
- Started
- Last post
- 5 Responses
- omgitsacamera0
Javascript
- Stugoo0
put the background image in using inline css.
then use a javascript function to pic an image at random.
- PSYKHO0
This works:
<SCRIPT LANGUAGE="Javascript"><!-- function bkgrnd() {} ; bg = new bkgrnd () ; n = 0 bg[n++] = "images/Image1.gif" bg[n++] = "images/Image2.gif" bg[n++] = "images/Image3.gif" bg[n++] = "images/Image4.gif" bg[n++] = "images/Image5.gif" //Just keep adding rnd = Math.floor(Math.random() * n) ; tmp = '<BODY BACKGROUND="' +bg[rnd]+ '"' +' BGCOLOR="#FFFFFF">' //--></SCRIPT></HEAD> <SCRIPT LANGUAGE="Javascript"><!-- document.write( tmp ) //--></SCRIPT>
- Forgot to remove the end header tag: </HEAD> works non the less.PSYKHO
- VectorMasked0
what they said ^^^
Because is she was german, the method would be different; and if she was Portuguese it could simply not be done.
;o)