js秒数转换天时分秒

var num = 11243700;
var s = num%60;
num=parseInt(num/60);
var m = num%60;
num = parseInt(num/60);
var h = num%24;
num = parseInt(num/24);
var d = num;
console.log(d+'天'+h+'时'+m+'分'+s+'秒')

js秒数转换天时分秒 

posted @ 2013-02-22 18:07  chenping2008  阅读(1268)  评论(0编辑  收藏  举报