当图片加载时显示默认图片:
给img标签添加一个onerror属性,
<img width="200" height="120" src="<%=basePath%>${items.goodsList.goodsPic}" onerror="this.src='<%=basePath %>p_w_picpaths/fail.jpg'"/>
转载于:https://blog.51cto.com/hatch/1651385
当图片加载时显示默认图片:
给img标签添加一个onerror属性,
<img width="200" height="120" src="<%=basePath%>${items.goodsList.goodsPic}" onerror="this.src='<%=basePath %>p_w_picpaths/fail.jpg'"/>
转载于:https://blog.51cto.com/hatch/1651385