Yesterday, my colleague was in charge of a homepage advertisement. The advertisement used multi-frame GIF animation, jpg in the HTML demonstration page, and the Image object load event was used to add the advertisement, this avoids the embarrassing situation where the advertisement is played and the image is not loaded yet, But encounters a super depressing situation, that is, the load event is continuously executed in IE, I found many reasons, and finally found the Image () that was originally caused by multiple frames of GIF on google (). the load event is repeatedly triggered. I have seen it again! In addition, some people post that this bug can be used to simulate multiple threads of js ~
Solution:
Var img = new Image ();
Img. load = function (){
// Do something
Img. load = null; // The value is null.
}
Img.src?'{}.gif ';
Source: http://www.js8.in/569.html