handleTimeFn(){
var date=new Date;
var year=date.getFullYear();
var month=date.getMonth()+1;
month =(month<10 ? “0”+month:month);
var day=date.getDate();
var time=year+’-’+month+’-’+day;
},
获取当前时间的函数
最新推荐文章于 2024-08-16 19:02:09 发布
handleTimeFn(){
var date=new Date;
var year=date.getFullYear();
var month=date.getMonth()+1;
month =(month<10 ? “0”+month:month);
var day=date.getDate();
var time=year+’-’+month+’-’+day;
},