Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/11/2004, 04:17
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola kuiboss.

Te dejo un código sencillo:
Código HTML:
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function color() {
  var colo=new Array('red','green','blue','yellow');
	co=Math.round(Math.random()*colo.length);
	document.body.style.backgroundColor=colo[co];
	setTimeout('color()','3000'); // 3000 = 3 segundos
}
</script>

</head>
<body onload="color()">

</body>
</html> 
Saludos,