aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html
index faa183e9cf..53cdaee185 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/totimestring/index.html
@@ -11,19 +11,19 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/toTimeString
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><var>dateObj</var>.toTimeString()</pre>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>{{jsxref("Global_Objects/Date", "Date")}} 对象的实例引用一个具体的时间点。 调用 {{jsxref("Date.toString", "toString")}} 方法以美式英语和人类易读的形式,返回日期对象的格式化字符串。在 <a href="/en-US/docs/SpiderMonkey" title="SpiderMonkey">SpiderMonkey</a> 里,该字符串由日期部分(年月日)和其后的时间部分(时分秒和时区)组成。有时会需要获取时间部分的字符串,这可以由 <code>toTimeString</code> 方法完成。</p>
<p>The <code>toTimeString</code> method is especially useful because compliant engines implementing <a href="https://developer.mozilla.org/en-US/docs/ECMAScript" title="ECMAScript">ECMA-262</a> may differ in the string obtained from <code>toString</code> for <code>Date</code> objects, as the format is implementation-dependent; simple string slicing approaches may not produce consistent results across multiple engines.</p>
-<h2 id="Example" name="Example">例子</h2>
+<h2 id="Example">例子</h2>
-<h3 id="Example:_A_basic_usage_of_toTimeString" name="Example:_A_basic_usage_of_toTimeString">例子:<code>toTimeString</code> 方法的简单使用</h3>
+<h3 id="Example:_A_basic_usage_of_toTimeString">例子:<code>toTimeString</code> 方法的简单使用</h3>
<pre class="brush:js">var d = new Date(1993, 6, 28, 14, 39, 7);
@@ -62,7 +62,7 @@ println(d.toTimeString()); // prints 14:39:07 GMT-0600 (PDT)
<p>{{Compat("javascript.builtins.Date.toTimeString")}}</p>
-<h2 id="See_Also" name="See_Also">相关链接</h2>
+<h2 id="See_Also">相关链接</h2>
<ul>
<li>{{jsxref("Date.prototype.toLocaleTimeString()")}}</li>