Display Random Image or Quote
The first step in using this script is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called rand.js.
You now need to update this code to specify the images or quotes that you want to use. First you need to repeat the code0 line as many times as necessary until the array contains as many entries as you wish to include in the random selection (it has three to start with so if you want 10 choices repeat the line an additional seven times).
If you are using quotes you then simply replace the code0, code1, and code2 references with the text for your quotes. If you want to use this code to display a random image then you need to place all of the HTML code for each of your images into the entries instead. You can make just about any type of code for your page into a random selection by placing the appropriate HTML and text into the entries.
Finally, you attach the script into your web page in the body section of your page where you want the link or message to appear using the following code:
For greater flexibility I recommend you use my more modern Unobtrusive Version of this script.