Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/10/2008, 12:40
Avatar de anlhp
anlhp
 
Fecha de Ingreso: agosto-2008
Mensajes: 121
Antigüedad: 16 años, 6 meses
Puntos: 1
Respuesta: Funcion con incremento - Dificilillo

aki te dejo algo por si te sirve al menos de aclaracion

Código HTML:
<body>


<div style="display: none; width: 100px; height: 20px; background: #fce">
</div>

<div style="display: none; width: 100px; height: 20px; background: #fa4">
</div>

<div style="display: none; width: 100px; height: 20px; background: #45f">
</div>

<script type="text/javascript">
	
	var i = 0;

	function anime(){
	var oDivs = document.getElementsByTagName('div');
	oDivs.item(i).style.display = (oDivs.item(i).style.display == 'none')?'block':'none';
	i = (i+1)%3;
	}

	setInterval(anime,1000);

</script>
</body>