var now = new Date() ,beforeDay = new Date(now.getTime() - 24乘60乘60乘1000乘3) ,year = beforeDay.getFullYear() ,month = beforeDay.getMonth() + 1 ,day = beforeDay.getDay(); console.log(year,month,day); if(month < 10) month = ‘0’ + month.toString(); if(day < 10) day = ‘0’ + day.toString(); var before = year.toString() + month + day; console.log('before = '+day,before);
作者
作者其它话题