Javascript data对象中的月份(month)属性

今天调试一个倒计时javascript脚本,多次debug依然不能显示正确的时间,经过google才得知月份参数不对,date中的月份从0开始:

MethodDescription
getDate() Get the day as a number (1-31)
getDay() Get the weekday as a number (0-6)
getFullYear() Get the four digit year (yyyy)
getHours() Get the hour (0-23)
getMilliseconds() Get the milliseconds (0-999)
getMinutes() Get the minutes (0-59)
getMonth() Get the month (0-11)
getSeconds() Get the seconds (0-59)
getTime() Get the time (milliseconds since January 1, 1970)
posted @ 2015-02-26 13:20  蒙面  阅读(725)  评论(0编辑  收藏  举报