文章最后更新时间为:2021 年 06 月 04 日 09:39:14 Loading... 把下面代码复制到</body>前面(放到所有图片标签的后边) <script type="text/javascript"> $(function(){ $("img").attr("onerror","slnotimg();"); $("img").each(function(){ this.src = this.src; }); }); function slnotimg() { var img = event.srcElement; img.src = "./img/load.svg";//若加载失败显示的图片 img.onerror = null; } </script> 需引入jq typecho里需要改代码才能用这个方法 Last modification:June 4, 2021 © Allow specification reprint Support Appreciate the author Like 0 如果觉得我的文章对你有用,请随意赞赏
2 comments
什么意思?::(小乖)
啥