function DateAdd(date, days )
{
var tempDate = Date.parse(date.replace(/-/g, "/"));
tempDate = tempDate + days * 24 * 60 * 60 * 1000
tempDate = new Date(tempDate)
return tempDate.getFullYear().toString()+"-"+(parseInt(tempDate.getMonth(),10)+parseInt(1)).toString()+ "-"+tempDate.getDate().toString();
}
JavaScript日期加减
最新推荐文章于 2024-04-30 18:33:01 发布