1.js方法:
function replaceErrorImg(obj)
{
obj.src="images/common/error.bmp";
}
2.jquery绑定
$('img').error(function() {
$(this).attr("src", "images/common/error1.gif");
});
1.js方法:
function replaceErrorImg(obj)
{
obj.src="images/common/error.bmp";
}
2.jquery绑定
$('img').error(function() {
$(this).attr("src", "images/common/error1.gif");
});
转载于:https://www.cnblogs.com/rnckty/p/4094231.html