Created
January 6, 2018 01:56
-
-
Save marcobeltempo/faf52638a157d19a7c0a9ce652edd544 to your computer and use it in GitHub Desktop.
Lab 11 Test Case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img = new Image(100, 100); | |
img.src = 'https://i2.wp.com/www.marcobeltempo.com/wp-content/uploads/2016/05/mb_logo_38x38.png?fit=38%2C38&ssl=1'; | |
document.body.appendChild(img); | |
img.onload = function() { | |
document.getElementsByTagName("body")[0].style.backgroundColor = "red"; | |
} | |
img.onerror = function() { | |
alert("Error"); | |
}; | |
img.src = 'https://i2.wp.com/www.marcobeltempo.com/wp-content/uploads/2016/05/mb_logo_38x38.png?fit=38%2C38&ssl=1' | |
document.body.appendChild(img); | |
img.onload = function() {} | |
img.onerror = function() { | |
alert("Error"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment