|
<script language="JavaScript" type="text/javascript">
var Image1 = new Image();
Image1 = "pictures/adsamaz.JPG";
var Image2 = new Image();
Image2 = "pictures/adsebay.JPG";
var Image3 = new Image();
Image3 = "pictures/ads.JPG";
var Image4 = new Image();
Image4 = "pictures/tips.jpg";
var url = "advertising.htm";
var Image5 = new Image();
Image5 = "pictures/inthegarden.JPG";
var i = 0;
var z = 0;
function preload()
{
//Use a random calculate here to decide which image to use
var num = rand(5);
if(num==1) document.images[1].src = Image1; // [1] is the image number on page ie if only one image then it would be 0.
else if(num==2) document.images[1].src=Image2;
//continue with all images
}
function rand(num) {
return Math.floor(Math.random() * num+1); /*returns a random number between 1 and the number it is given*/
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad = "preload();">
All the fundamentals are there hopefully you will be able to get how to do it.
__________________
Please login or register to view this content. Registration is FREE - The Internet Jumble Sale,
Please login or register to view this content. Registration is FREE - Personal space containing interesting articles and information on downloadable scripts
Please login or register to view this content. Registration is FREE - Free link exchange directory and PPC advertising scheme
Please login or register to view this content. Registration is FREE - The ejumblesale forums
|