JavaScript:Date

Date 对象用于处理日期和时间,基于1970年1月1日(世界标准时间)起的毫秒数。

1、创建 Date 对象

var myDate=new Date()

Date 对象会自动把当前日期和时间保存为其初始值。

2、常用方法

!](https://img-blog.csdnimg.cn/20210305193420749.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNTA0ODE1,size_16,color_FFFFFF,t_70)

猜你喜欢

转载自blog.csdn.net/qq_41504815/article/details/114409994
今日推荐