1. 首页
  2. 数据库
  3. javascript 当前日期加(天、周、月、年)

javascript 当前日期加(天、周、月、年)

上传者: 2020-12-03 05:54:47上传 PDF文件 13.54KB 热度 10次
代码如下://create the date var myDate = new Date(); //add a day to the date myDate.setDate(myDate.getDate() + 1); //add a week myDate.setDate(myDate.getDate() + 7); //add a month myDate.setMonth(myDate.getMonth() + 1); //add a year myDate.setYear(myDate.getYear() + 1);
下载地址
用户评论