开发者

JavaScript image preloading and 403 error

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜