主页
JavaScript
JavaScript 日期方法
tryjs_date_getmonth
运行 ❯
×
更改方向
保存代码
更改主题
JavaScript getMonth()
getMonth() 方法以 0 到 11 之间的数字形式返回日期的月份。
要获得正确的月份,您必须加 1: