Possible Duplicate:
jQuery or JavaScript: Determine when image finished loading
The problem is known, but I can t find any simple solution:
var img = new Image();
img.onLoad = function() {
console.log("load"); // this event doesn t fire
};
img.src = "img/domino/21.png";
console.log(img.complete); // false
setTimeout(function() {
console.log(img.complete); // sometimes true, sometimes false
}, 10);
我期待举行这次富集活动,但我找不到任何东西。 你们是否帮助?