Answers for "javascript on image load"

3

javascript on image load

window.onload = function () {

        var logo = document.getElementById('sologo');

        logo.onload = function () {
            alert ("The image has loaded!");		
        };

        setTimeout(function(){
            logo.src = 'https://edmullen.net/test/rc.jpg';         
        }, 5000);
    };
Posted by: Guest on March-20-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language