点击运行
JavaScript getMonth()
getMonth()方法以 0 到 11 之间的数字返回日期的月份。
要获得正确的月份,您必须添加 1:
运行结果