//图像加载出错时的处理 function errorImg(img) { img.src = "默认图片.jpg"; img.onerror = null; }
<img width="32" height="32" src="1.jpg" onerror="errorImg(this)" />