标签:
audioDom.oncanplaythrough = function(){
var msecond = this.duration;//获得整个音乐的长度
var m = parseInt(msecond/60);//分
var s = parseInt(msecond%60);//秒
var ms = (m<10 ? ("0"+m):m)+":"+(s<10 ? ("0"+s):s);
document.getElementById("time").innerHTML = ms;
};
标签:
原文地址:http://www.cnblogs.com/xiaoyunyun/p/4823681.html