date

var  date  =  new  Date( );spa

(1)Date( )get

  返回当日的日期和时间date

(2)getDate( )im

  返回一月中的某一天(1-31)时间戳

(3)getMonth( )时间

  返回一年中的某个月(0~11)co

(4)getFullYear( )数字

  返回四位数字的年份new

(5)getHours( )日期

  返回小时(0~23)

(6)getMinutes( )

  返回分钟(0~59)

(7)getSeconds( )

  返回秒数(0~59)

(8)getMilliseconds( )

  返回毫秒数(0~999)

(9)getTime( )

  返回1970年1月1日至今的毫秒数,时间戳

(10)setDate( )

  设置一月中的某一天(1-31)

(11)setMonth( )

  设置一年中的某个月(0~11)

(12)setFullYear( )

  设置四位数字的年份

(13)setHours( )

  设置小时(0~23)

(14)setMinutes( )

  设置分钟(0~59)

(15)setSeconds( )

  设置秒数(0~59)

(16)setMilliseconds( )

  设置毫秒数(0~999)

(17)setTime( )

  设置1970年1月1日至今的毫秒数,时间戳

相关文章
相关标签/搜索