发布网友 发布时间:2022-04-07 05:33
共1个回答
热心网友 时间:2022-04-07 07:03
var year=dt.getFullYear();追答The getMonth method returns an integer between 0 and 11 indicating the
month value in the Date object. The integer returned is not the
traditional number used to indicate the month. It is one less. If "Jan 5, 1996
08:47:00" is stored in a Date object, getMonth returns 0.
The value returned from the getDay method is an integer between 0 and 6
representing the day of the week and corresponds to a day of the week