I need to be able to cancel an image load after a set period of time, and it needs to subsequently call the onError action.
What it will do:
If it can't in 1 second (1000 ms), then execute onError.
onError changes the images src attribute, then reloads the img. (Changes to different uri, like mirror.site.com/err.png)
Also, it can be a javascript function (newImage).
Sorry for not supplying existing code; I can code in multiple langs though.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…