From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../date/getutcmilliseconds/index.html | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds') diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html new file mode 100644 index 0000000000..a77a980836 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html @@ -0,0 +1,74 @@ +--- +title: Date.prototype.getUTCMilliseconds() +slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds +translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds +--- +
{{JSRef("Global_Objects", "Date")}}
+ +

getUTCMilliseconds() 方法以世界时为标准,返回一个指定的日期对象的毫秒数。

+ +
{{EmbedInteractiveExample("pages/js/date-getutcmilliseconds.html")}}
+ +

语法

+ +
dateObj.getUTCMilliseconds()
+ +

参数

+ +

无。

+ +

返回值

+ +

getUTCMilliseconds() 返回一个 0 到 999 的整数。

+ +

例子

+ +

例子: 使用 getUTCMilliseconds() 方法

+ +

下例将当前时间的毫秒部分赋值给变量 milliseconds

+ +
var today = new Date();
+var milliseconds = today.getUTCMilliseconds();
+
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + + + + +
规范版本规范状态注解
ECMAScript 1st Edition.StandardInitial definition. Implemented in JavaScript 1.3.
{{SpecName('ES5.1', '#sec-15.9.5.25', 'Date.prototype.getUTCMilliseconds')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-date.prototype.getutcmilliseconds', 'Date.prototype.getUTCMilliseconds')}}{{Spec2('ES6')}} 
+ +

浏览器兼容性

+ +
+ + +

{{Compat("javascript.builtins.Date.getUTCMilliseconds")}}

+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf