Source Code:
(back to article)
Submit
Result:
Report an issue
<div>Here you see the w3docs logo when the page is loaded.</div> <br /> <div id="imageContainer" style="background-color: grey;"></div> <script> window.onload = function() { var img = new Image(); img.onload = function() { document.getElementById('imageContainer').appendChild(img); }; img.src = 'https://www.w3docs.com/build/images/logo-color-w3.png'; }; </script>