function dateAdd(startDate) {
startDate = new Date(startDate);
startDate = +startDate + 1000*60*60*24;
startDate = new Date(startDate);
var nextStartDate = startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate();
return nextStartDate;
startDate = new Date(startDate);
startDate = +startDate + 1000*60*60*24;
startDate = new Date(startDate);
var nextStartDate = startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate();
return nextStartDate;
}
这里的startDate是我从别的地方传过来的,可以自定义时间, startDate = +startDate + 1000*60*60*24;当时间为月末,这里会自动加一个月。