newImgs.onload没有执行到,为什么呢?关于arr的图片链接就不po进来了 function preLoadingImg(arr){ for (var i = 0; i < len; i++) { var newImgs = new Image(); newImgs.onload = function{ progress.innerHTML = Math.round((count+1) / len * 100 + '%'); if(count >= len - 1){ loading.style.display = "none"; document.title = "1/" + len; } count++; }; newImgs.src = arr[i]; } } preLoadingImg(imgs);
添加回答
举报
0/150
提交
取消