标签:
var assetArray = [ ‘img/01.jpg‘, ‘img/02.jpg‘, ‘img/03.jpg‘ ]; var assetCount = assetArray.length; for (var i = 0; i < assetArray.length; i++) { var c = new Image(); c.onload = function() { assetCount--; if (assetCount <= 0) initApp(); } c.src = assetArray[i]; }
标签:
原文地址:http://www.cnblogs.com/jameshu/p/4295522.html