// 方法 1:更换图片地址$("img").error(function(){$(this).attr("src", "加载失败.png");});// 方法 2:隐藏它$("img").error(function(){$(this).hide();});