aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getutcmilliseconds/index.html74
1 files changed, 74 insertions, 0 deletions
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
+---
+<div>{{JSRef("Global_Objects", "Date")}}</div>
+
+<p><strong><code>getUTCMilliseconds()</code></strong> 方法以世界时为标准,返回一个指定的日期对象的毫秒数。</p>
+
+<div>{{EmbedInteractiveExample("pages/js/date-getutcmilliseconds.html")}}</div>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="syntaxbox"><code><var>dateObj</var>.getUTCMilliseconds()</code></pre>
+
+<h3 id="Parameters" name="Parameters">参数</h3>
+
+<p>无。</p>
+
+<h3 id="Returns" name="Returns">返回值</h3>
+
+<p><code>getUTCMilliseconds()</code> 返回一个 0 到 999 的整数。</p>
+
+<h2 id="Examples" name="Examples">例子</h2>
+
+<h3 id="Example:_Using_getUTCMilliseconds" name="Example:_Using_getUTCMilliseconds">例子: 使用 <code>getUTCMilliseconds()</code> 方法</h3>
+
+<p>下例将当前时间的毫秒部分赋值给变量 <code>milliseconds</code>。</p>
+
+<pre class="brush: js">var today = new Date();
+var milliseconds = today.getUTCMilliseconds();
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范版本</th>
+ <th scope="col">规范状态</th>
+ <th scope="col">注解</th>
+ </tr>
+ <tr>
+ <td>ECMAScript 1st Edition.</td>
+ <td>Standard</td>
+ <td>Initial definition. Implemented in JavaScript 1.3.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES5.1', '#sec-15.9.5.25', 'Date.prototype.getUTCMilliseconds')}}</td>
+ <td>{{Spec2('ES5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-date.prototype.getutcmilliseconds', 'Date.prototype.getUTCMilliseconds')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<div>
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("javascript.builtins.Date.getUTCMilliseconds")}}</p>
+</div>
+
+<h2 id="See_also" name="See_also">相关链接</h2>
+
+<ul>
+ <li>{{jsxref("Date.prototype.getMilliseconds()")}}</li>
+ <li>{{jsxref("Date.prototype.setUTCMilliseconds()")}}</li>
+</ul>