jsCode.com :: home :: index WebMaster Tools
Free NewsTicker Applet
Essential Tips, Tricks, Scripts & Techniques for WebMasters
.
Random Image Script
Be certain to check out our
comprehensive library of JavaScripts
Click Here
.
.
Script Demo:

Refresh the page several times.  There are five images.  An image will be chosen at random and displayed each time by the script. Remember this is a random choice, so it's possible for the same image to appear a number of times in succession.  The more images you use, the less possibility of repetition there is.



Description:

Use this script to randomly display a different image each time that the page is visited. Any number of images can be used, and set-up is very easy.
.

Instructions:

This is a two-part installation.  You will copy and paste the main script into the head of your page, and another small script into the body where you wish the images to appear.  You can add as many images as you wish, just follow the pattern in the script.
.

Part One:

Click Here to select the code.  Use Control-C to copy it to your clipboard.

Paste this part of the code into the <head> section  of your page.
.

Part Two:

Click Here to select the code.  Use Control-C to copy it to your clipboard.

Paste this part of the code into the <body> section  of your page where you want the images to appear.
.

.
jsCode.com
Essential Tips, Tricks, Scripts & Techniques for WebMasters
.
Copyright 2001-2012 by jsCode.com
All rights reserved
.

CodeBrain InterNET
Group
.
The 2012 Evolution™
.
www.CodeBrain.com www.BrainCode.com www.CodeLifter.com www.MicroTicker.com
www.etLux.com www.OECCorp.com www.CodeBelly.com www.CodeFoot.com
www.jsCode.comwww.Droiddd.comwww.PopUpWorks.comwww.TrayApps.com
.
.
.