I have a page with a lot of images that are generated server-side depending on user actions. And when image loads successfully I'm happy, but when there is an error on the server I have to act according to what an error occurred.
For example:
- 500 code: do this stuff.
- 503 code: do that stuff
and so on.
So, my question: is there any way to get status code within "img" tag on-error event handler?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…