<html>
<head >
<title> Clock </title>
<script>
var numberList = new Array;
numberList[0] = "clock/0.jpg";
numberList[1] = "clock/1.jpg";
numberList[2] = "clock/2.jpg";
numberList[3] = "clock/3.jpg";
numberList[4] = "clock/4.jpg";
numberList[5] = "clock/5.jpg";
numberList[6] = "clock/6.jpg";
numberList[7] = "clock/7.jpg";
numberList[8] = "clock/8.jpg";
numberList[9] = "clock/9.jpg";
numberList["point"] = "clock/point.jpg";
var selector;
function rollIt ( thisImage )
{
selector = Math.floor( Math.random() * 10 );
document.images[ thisImage ].src = numberList[ selector ] ;
}
</script>
</head>
<body>
<center >
<img id="sec1" src="clock/0.jpg" onload="setTimeout( rollIt( this.id ) , 999 )" />
<img id="sec2" src="clock/0.jpg" onload="setTimeout( rollIt( this.id ) , 999 )" />
<!--
<img id="sec2" class="points" src="clock/point.jpg" height="100" width="35" />
<img class="time" id="min1" src="clock/0.jpg" onload="setTimeout( 'rollIt( 2 )' , 999 )" />
<img class="time" id="min2" src="clock/0.jpg" onload="setTimeout( 'rollIt( 3 )' , 999 )" />
<img id="sec2" class="points" src="clock/point.jpg" height="100" width="35" />
<img class="time" id="hour1" src="clock/0.jpg" onload="setTimeout( 'rollIt( 4 )' , 999 )" />
<img class="time" id="hour2" src="clock/0.jpg" onload="setTimeout( 'rollIt( 5 )' , 999 )" />
-->
</center>
</body>
</html>
Estoy tratando de hacer un segundero y quiero tomar los elementos de las imagenes por "id" si le paso "this.id" al objeto corre demasiado rapido. si le pongo directamente el id "0" o el de cada imagen corre bien. gracias