Have been searching with Google got loads of result but not that I can successfully implement.
I use these code from javascriptkit to display a random image from an array.
<script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
//-->
</script>
The script works very well but the images repeat itself sometimes (e.g. img6.gif -> img4.gif -> img4.gif), would like to have the images display without duplicate with the previous one.
I'm not very familiar with javascript as well as programming and this is my first time to play around with such, so any help is appreciated.