3
我正在嘗試使用加載圖像的進度來顯示進度條。我嘗試使用onload和onprogress,如前面的一個答案中所建議的,但只是onload作品。提前感謝。跟蹤在JavaScript中加載圖像的進度
var Img = new Image();
Img.onload = function() {
console.log("loaded");
};
Img.onprogress=function(){
console.log("progress");
};
Img.src = imageUrl;
的[圖像的JavaScript加載進度]可能的複製(http://stackoverflow.com/questions/14218607/javascript-loading-progress-of-an-image) – Xeos