img src加载失败给默认图片(默认图片加载失败不冒泡)

Jquery方法

$("img").one("error", function(e){
     $(this).attr("src", "default.gif");
});
原文地址:https://www.cnblogs.com/gaocong/p/5129721.html