var t1 = setInterval(function(){
payTime =_self.payTime--;
var intervalNextTime=payTime;
//转为时分秒
var h,m,s;
h = Math.floor(intervalNextTime/60/60%24);
m = Math.floor(intervalNextTime/60%60);
s = Math.floor(intervalNextTime%60);
console.log(h,m,s);
hh = (h<10)?'0'+h:h;
ss= (s<10)?'0'+s:s;
mm= (m<10)?'0'+m:m;
_self.formatPayTime=hh+":"+mm+":"+ss;
console.log(_self.formatPayTime);
if(_self.formatPayTime == '00:00:00'){
window.clearInterval(t1);
}
},1000);
js秒数转化为时分秒
猜你喜欢
转载自blog.csdn.net/qq_43649479/article/details/88424095
今日推荐
周排行