I'm preloading Images using Javascript. Some of them retur开发者_如何学Pythonns with error.
How can I know in code which error it is?
404/403?
onerror (evt)
doesn't provide one - or I just don't know where to look.
thanks.
UPDATE
I know that I can use FireBug / WebInspector... I need to decide dynamically, via code, which image to put on screen instead of erroneous one: "Image not found" or "Prohibited" or sth.
Install a firebug (mozilla plug-in) and check the net tab. Click on a request and the on response tab.
Chrome also has built in functionality to debug stuff like this - its under tools/developertools
精彩评论