Gracias, Wikipedia.
ShareCode
Permalink: http://www.treeweb.es/u/974/ 01/02/2011

ShareCode

1 2 var color = function (evento) {3  o = evento.target;4  if (o.style.backgroundColor == 'navy') {5  o.style.backgroundColor = '';6  }else{7  o.style.backgroundColor = 'navy'; 8  }9 }10 11 function boom(boton) {12  boton.style.display = 'none';13 14  e = document.getElementById('marco');15 16  for (i=0; i<1792; i++) {17  n = document.createElement('div');18  n.className = 'cuadrado';19  n.onmouseover = color;20  e.appendChild(n);21  }22 }23 


Este ShareCode tiene versiones:
  1. ¡BOOM! ... (24/04/2013)
  2. ¡BOOM! ... (24/04/2013)
  3. ¡BOOM! ... (24/04/2013)
  4. ¡BOOM! ... (24/04/2013)
Enlace
El enlace para compartir es: