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;當時間爲月末,這裏會自動加一個月。