2012-08-02 17 views

回答

1

功能我在圖書館使用了這一事件:

function onImageError (source) { 
    //NOTE: Image Error function 
    //Useage: <img src="" onerror="onImgError(this)" /> 

    source.src = "/public/images/global/backup_product.jpg"; // location of sample/error image 
    source.onerror = ""; // disable onerror to prevent endless loop 
    return true; 
} 
2

是的,您可以利用圖像元素的onerror事件。

相關問題