評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 1,平均評等: 5]
[javascript]
function formatSecond(secs) {
var hr = Math.floor(secs / 3600);
var min = Math.floor((secs – (hr * 3600)) / 60);
var sec = parseInt( secs – (hr * 3600) – (min * 60));
while (min.length < 2) { min = ‘0’ + min; }
while (sec.length < 2) { sec = ‘0’ + min; }
if (hr) hr += ‘:’;
return hr + min + ‘:’ + sec;
}
[/javascript]
評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 1,平均評等: 5]