Delayed Image Loader in Javascript

Category > JAVASCRIPT || Published on : Thursday, April 8, 2021 || Views: 2199 || Delayed Image Loader


Here Pawan Kumar will explain how to Delayed Image Loader

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script>
        function runBanner() {
            // change the name of the image below
            document.getElementById('banner').src ='large_img.gif';
        }

        // change the number below to adjust the time the image takes to load
        window.setTimeout("runBanner() ", 5000);
    </script>
</head>
<body>
    <img src="small_img.gif" border="0" id="banner">
</body>
</html>

 

Download Source Codes