Javascript – How to show an image and hide it after 5 seconds

javascript

var div=document.createElement("div");
div.innerHTML="<img src='load.gif'>";

With javascript.

Best Answer

Make use of setTimeout().

Edit: I realize, isn't this a bit fake? Shouldn't you hide a load.gif when the loading task is actually finished? Using them for decoration only makes no sense.