imgsrc和img src的区别

他们两者的区别,谢谢大佬们

1.src後跟图片路径,会直接加载。
如<img src="">,它 是标准的HTML语言 浏览器都能支持

2.lazy_src後跟图片路径,但是不会直接加载,它是延迟加载图片路径的JS插件,对于某些浏览器来说自然无法识别
延时代码:
<script src="jquery-1.11.1.js"></script>
<script>
$(document).ready(function () {
$(window).scroll(function () {
loadImg();
})

function loadImg() {
$("img").each(function () {
if ($(this).offset().top < $(window).height() * 2 + $(window).scrollTop()) {
$(this).attr("src", $(this).attr("lazy_src")).removeAttr("lazy_src");
}
});
}
})

</script>
温馨提示:答案为网友推荐,仅供参考