jeudi 2 avril 2015

How To Get Random Number In HTML/Java Script And Have Something Different Happen With Each One

I am trying to make a HTML file that will open a random picture out of 6. What I have already will only open the one the one that I specify. Is there a way to make it open a random one.



<!DOCTYPE html>
<body>
<img src="IMG_1643.jpg" width="100%"/>
<script type="text/javascript">
setInterval("window.close()", 10000);
</script>
</body>


The names of the 6 images I have are:



^04CA0231DA52E6C51B485BD9D7B46A52692ECC1CCB4F6E30A4^pimgpsh_fullsize_distr.jpg
^EE8BDA9E7F039326CF7340D2B4849A4ECA9E466F65BF7C4EE3^pimgpsh_fullsize_distr.jpg
IMG_1643.jpg
YTpic1 .png
YTpic2.jpg
YTpic2.gif




Aucun commentaire:

Enregistrer un commentaire