function Test(day) {
var today = new Date();
var beforMilliseconds = today
var beforday = new Date();
beforday
var strYear = beforday
var strDay = beforday
var strMonth = beforday
if (strMonth <
strMonth = "
}
var strYesterday = strYear + "
alert(strYesterday);
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20584.html