【js】取昨天,前天
var today=new Date();
var yesterday=new Date();
yesterday.setDate(today.getDate()-1);
var twodayago=new Date();
twodayago.setDate(today.getDate()-2);
var today=new Date();
var yesterday=new Date();
yesterday.setDate(today.getDate()-1);
var twodayago=new Date();
twodayago.setDate(today.getDate()-2);