});以上就是jquery无法"/>

jquery无法加载图片怎么办

本文环境:windows10、jquery2.2.4,本文适用于所有品牌的电脑。

解决方法如下:

方法 1:更换图片地址

$('img').error(function(){
    $(this).attr('src', '加载失败.webp');
});

方法 2:隐藏它

$("img").error(function(){
    $(this).hide();
});

以上就是jquery无法加载图片怎么办的详细内容,更多请关注易知道|edz.cc其它相关文章!

推荐阅读