Menu
Mr. J
I’ve not been successful in getting the script to work. here is my code:
<script language=”javascript”>
<!–
mypics=new Array
(“1.jpg”, “2.jpg”, “3.jpg”)
function show_pic(){
randomNum=Math.floor(Math.random() * mypics.length);
document.getElementById(“myimage”).src=mypics[randomNum];
alert(randomNum)
}
//–>
</script>
<img id=”myimage” src=”1.jpg”>
all put inside the body tags. The only picture that shows is the first one, even on refresh or re-entry.
Can you help?
Thanks, Janna