Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/06/2013, 09:40
rascabuchitos
 
Fecha de Ingreso: abril-2011
Ubicación: Peru
Mensajes: 486
Antigüedad: 13 años
Puntos: 9
cargar preloder con cada f5

Hola amigos
alguien podria decirme porque este codigo no vuelve a mostrar el preloder cada vez que le doy f5?


gracias


Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <style type="text/css">
  5. <!--
  6. body {
  7.     font-family: "Trebuchet MS", Tahoma, Arial;
  8.     font-size: 12px;
  9.     color: #666666;
  10.     text-align: center;
  11. }
  12. img {
  13.     border: 3px solid #CCCCCC;
  14.     padding: 2px;
  15. }
  16. .loading {
  17.    background: url(loading.gif) no-repeat center center;
  18. }
  19. .loaded {
  20.     background: none;
  21. }
  22. -->
  23. <script type="text/javascript">
  24. loadImage = new Image();
  25. loadImage.src = "loading.gif";
  26. </head>
  27. <p><strong>Precargar Imagenes en Javascript </strong></p>
  28. <p><img src="flamencos.png" width="512" height="387" class="loading" /></p>
  29. <script type="text/javascript">
  30. var imgs = document.getElementsByTagName('img');
  31. for(i in imgs) {
  32.     imgs[i].onload = function() {
  33.         this.className = "loaded";
  34.     }
  35. }
  36. </body>
  37. </html>