+ 6

Is this situation count as loaded?

For example: <div> <img src="jsnssbs.png"> <img src="sbs.png"> </div> When the first age is loaded, but the second image is not, Does the div count as onloaded?

11th Mar 2019, 1:34 PM
Jingga Sona
Jingga Sona - avatar
2 Respostas
+ 4
First I tried adding an onload event to the div, but it didn’t seem to work for that element (I mean, the onload event doesn’t exist in that element). Then I tried window.onload with two images, and when the image fails to load, it will display the alternative text, which seems to count as loaded. So when the compiler says that the image path doesn’t exist, and it displays the alt attribute, it will have counted as loaded
12th Mar 2019, 5:22 AM
Rowsej
Rowsej - avatar
+ 3
<div> is just for grouping HTML element You might have given wrong path or extension for 2nd image
11th Mar 2019, 2:32 PM
Rishi Anand
Rishi Anand - avatar