//绑定错误随机图
document.addEventListener("error", function (e) {
var elem = e.target;
if (elem.tagName.toLowerCase() == 'img') {
var imgArr = ['1.png','2.png','3.png'];//图片路径数组
var index = Math.floor((Math.random()*imgArr.length));//随机下标,保证随机的数字在数组中能取
var imgSrc = "${ctx}/pc/img/"+imgArr[index];//随机获取的图片路径
elem.src=imgSrc;
}
}, true);