后台传来毫秒,前台转换成对应的时分秒
//在线时长
function longTime(seconds){
//总秒数
//seconds=seconds/1000;
//得到小时
var hour = seconds/3600;
var r = seconds%3600;
var m = r/60;
var s = r%60;
return parseInt(hour)+":"+parseInt(m)+":"+parseInt(s);
}
后台传来毫秒,前台转换成对应的时分秒
//在线时长
function longTime(seconds){
//总秒数
//seconds=seconds/1000;
//得到小时
var hour = seconds/3600;
var r = seconds%3600;
var m = r/60;
var s = r%60;
return parseInt(hour)+":"+parseInt(m)+":"+parseInt(s);
}