The following code is not working. It doesn't show any image. Please help.
var myVar = setInterval(function(){randim()},1000);
function randim(){
var bannerImages = new Array( );
bannerImages[0] = "1.jpg";
bannerImages[1] = "2.jpg";
bannerImages[2] = "3.jpg";
bannerImages[3] = "4.jpg";
bannerImages[4] = "5.jpg";
bannerImages[5] = "6.jpg";
bannerImages[6] = "7.jpg";
var randomImageIndex = 0;
randomImageIndex = Math.round( Math.random( ) * 6 );
}
function myStopFunction()
{
clearInterval(myVar);
}
A script on this page starts this image change:

Lakshmanan Sethu SankaranarayanPosted Mar 16, 2014, 12:47 AM
Abhijeet SinghPosted Mar 16, 2014, 12:28 AM
http://mrbool.com/how-to-swap-images-using-javascript/26669
If it is helpful then please mark it as answer