<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<img src="https://upload-imag1es.jianshu.io/upload_images/2666001-57f1523c3f469016.png?imageMogr2/auto-orient/strip|imageView2/2/w/650/format/webp" 
    onerror="noFind(this);" />
    <script>
        function noFind(event){
            console.log("event",event)
            var img = event;
            img.src = "https://pic.cnblogs.com/avatar/1505226/20191123150748.png"  // 默认图片地址
            img.onerror = null;  // 控制不要循环展示错误
        }
    </script>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-12-23
猜你喜欢
  • 2021-12-09
  • 2021-12-31
  • 2022-01-25
  • 2021-12-05
  • 2021-10-08
  • 2021-12-23
  • 2021-12-07
相关资源
相似解决方案