function Test(day) {
var today = new Date( );
var beforMilliseconds = today.getTime() - 1000 * 3600 * 24 * day;
var beforday = new Date();
beforday.setTime(beforMill) i秒);
var str Year = beforday .getFull Year();
var strDay = beforday.getDate();
var strMonth = beforday.getMonth() 1;
if (strMonth strMonth = "0" strMonth ;
}
var strYesterday = str Year "-" strMonth "-" strDay;
aler(strYesterday);
}