1、获取Date对象
var dDate = new Date();
2、获取当前年份
dDate.getFullYear();
3、获取当前月份
dDate.getMonth()+1; //注意 月份从0开始 所以要+1才能得到当前月份
4、获取当前日期
dDate.getDate();
5、获取当前小时
dDate.getHours();
6、获取当前分钟
dDate.getMinutes();
7、获取当前秒
dDate.getSeconds();
1、获取Date对象
var dDate = new Date();
2、获取当前年份
dDate.getFullYear();
3、获取当前月份
dDate.getMonth()+1; //注意 月份从0开始 所以要+1才能得到当前月份
4、获取当前日期
dDate.getDate();
5、获取当前小时
dDate.getHours();
6、获取当前分钟
dDate.getMinutes();
7、获取当前秒
dDate.getSeconds();