PDA

View Full Version : javascript help



VietBoyVS
04-12-2004, 12:39 AM
<script language="javascript">
var a=new Array(3);
a[0].src="a.gif";
a[1].src="pix.gif";
a[2].src="nsx.gif";
var x=Math.round()*3;
document.write('<br><br>');
document.write('<img src=" +a[Math.random(x)].src + ">');

</script>


How do I set so that the it will display the picture randomly each time the page is load?