img路径错误时,用户友好图片

img 标签的属性里面添加

onerror="this.src='error友好图片'"

就可以了!

posted @ 2019-03-31 23:59  龙er飞  阅读(243)  评论(0)    收藏  举报