pixelpie
Dec 2nd 2007, 4:35 am
Hi, using Math.random(), I need to show one of six pictures every time I reload the page. I need to use the while loop too.
So far I have this, but it only shows four of the six pictures I have.
<script language="JavaScript">
var random = Math.random() ;
var picnum = Math.round(random*4)+1;
</script>
</head>
<script language="JavaScript">
document.write('<img src=picture/film'+picnum+'.jpg>')
</script>
Thanks for your help! :o
So far I have this, but it only shows four of the six pictures I have.
<script language="JavaScript">
var random = Math.random() ;
var picnum = Math.round(random*4)+1;
</script>
</head>
<script language="JavaScript">
document.write('<img src=picture/film'+picnum+'.jpg>')
</script>
Thanks for your help! :o