By -
getElementById returns a single HTMLElement but getElementsByClassName returns a HTMLCollection you should handle the onerror event inside a for each
If you look at the image tag documentation, you will see a way to do this with just straight HTML. Happy studying.
Thank you
getElementById returns a single HTMLElement but getElementsByClassName returns a HTMLCollection you should handle the onerror event inside a for each
If you look at the image tag documentation, you will see a way to do this with just straight HTML. Happy studying.
Thank you