javascript on image load 1

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);
    };

Here is what the above code is Doing:
1. The first line of code is a function that will run when the page loads.
2. The second line of code is a variable that is assigned the value of the element with the id of “sologo”.
3. The third line of code is a function that will run when the image loads.
4. The fourth line of code is a function that will run after 5 seconds.
5. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run when the page loads. The second line of code is a variable that is assigned the value of the element with the id of “sologo”. The third line of code is a function that will run when the image loads. The fourth line of code is a function that will run after 5 seconds. The fifth line of code is a variable that is assigned the value of the image.

The code is pretty simple. The first line of code is a function that will run

Similar Posts