问答详情
源自:7-23 编程练习
currentDate.getMonth() + 1 为什么要加1
currentDate.getMonth() + 1 为什么要加1
提问者:Linoonphan
2015-10-13 18:47
个回答
Y_du
2015-10-13 20:19:46
已采纳
月份约定是从0开始的,最大值是11.所以在使用过程中要+1
0