JS中new Date()的使用方法
获取时间: var date = new Date();//获取系统当前时间 获取特定格式的时间: 1 date.getYear(); //获取当前年份(2位) 2 date.getFullYear(); //获取完整的年份(4位,1970-????) 3 date.getMonth(); //获取当前月份(0-11,0代表1月) 4 date.getDate(); //获取当前...
转载
2018-05-11 15:09:37 ·
2788 阅读 ·
0 评论