标签:style blog io ar color sp for on div
getUTCMinutes() 方法可根据世界时 (UTC) 返回时间的分钟字段。
function timeFormat(ms){ if (!ms) return 0; var date = new Date(ms), h = date.getUTCHours(), m = date.getUTCMinutes(), s = date.getUTCSeconds(), timeStr = ‘‘; if (h) timeStr += h +‘小时‘; timeStr += m +‘分‘ + s + ‘秒‘; return timeStr; }
timeFormat(毫秒数);
标签:style blog io ar color sp for on div
原文地址:http://www.cnblogs.com/jiangtuzi/p/4108734.html