24 lines
379 B
Markdown
24 lines
379 B
Markdown
---
|
||
title: Date Now
|
||
localeTitle: 现在日期
|
||
---
|
||
## 现在日期
|
||
|
||
Date.now()方法返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
|
||
|
||
### 句法
|
||
|
||
```js
|
||
var timeInMs = Date.now();
|
||
```
|
||
|
||
### 例
|
||
|
||
```js
|
||
Date.now();
|
||
// 1508783660969
|
||
```
|
||
|
||
#### 更多信息:
|
||
|
||
[MDN文档](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now) |