Load a large animated gif for the user - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Image

Description

Load a large animated gif for the user

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*from  ww w  .  j av  a  2s .  c  o m*/
var image = new Image();
image.onload = function() {
    document.body.appendChild(image);
};
image.src = 'http://www.java2s.com/style/download.png';
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials