random media tutorial

not so much a tutorial as this is html code you can freely rip off.

this code allows for an image from a selection to be displayed at random when the page is loaded. replace the image links within the script tag to your own selection of images.

you will need a separate copy of the script and a separate id for every individual random image! change the [ img id="THIS" ] in the html and [ document.getElementById('THIS') ] to whatever you want, just make sure they match.




you can also use the same script to play a random audio file on load!