var audio = new Audio('mp3/music.mp3'); audio.onloadedmetadata = function(){ }
var loadImg = new Image(); loadImg.onload = function(){} loadImg.src = url;
判断图片是否加载完毕最好事把src赋值放到onload后面不然低版本浏览器会有问题
var audio = new Audio('mp3/music.mp3'); audio.onloadedmetadata = function(){ }
var loadImg = new Image(); loadImg.onload = function(){} loadImg.src = url;
判断图片是否加载完毕最好事把src赋值放到onload后面不然低版本浏览器会有问题