var aImages=document.getElementById("loadimg").getElementsByTagName("img");loadImg(aImages);window.onscroll=function(){loadImg(aImages)};function loadImg(arr){for(var i=0,len=arr.length;i<len;i++){if(arr[i].getBoundingClientRect().top<document.documentElement.clientHeight&&!arr[i].isLoad){arr[i].isLoad=true;(function(i){setTimeout(function(){aftLoadImg(arr[i],arr[i].getAttribute("data-imgurl"));arr[i].style.cssText="transition: 1s; opacity: 1;"},500)})(i)}}}function aftLoadImg(obj,url){if(url==wwwdomain||url==undefined||url==null){return}else{var oImg=new Image();oImg.onload=function(){obj.src=oImg.src};oImg.src=url}}