js获取前一天
a=new Date(time);
a=a.valueOf();
a = a - 1 * 24 * 60 * 60 * 1000;
a=new Date(a);
var m=a.getMonth() + 1;
var day= a.getDate();
if(m<10)
m='0'+m;
if(day<10)
day='0'+day;
a=a.getFullYear() + "-" + m + "-" + day;