开发者

JavaScript image preloading and 403 error

开发者 https://www.devze.com 2023-02-10 04:19 出处:网络
I\'m preloading Images using Javascript. Some of them retur开发者_如何学Pythonns with error. How can I know in code which error it is?

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

精彩评论

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