aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
index 43786dadd9..a5708b4fd6 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
@@ -11,16 +11,16 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">dateObj.setHours(<em>hoursValue</em>[, <em>minutesValue</em>[, <em>secondsValue</em>[, <em>msValue</em>]]])
</pre>
-<h3 id="Versions_prior_to_JavaScript_1.3" name="Versions_prior_to_JavaScript_1.3">JavaScript 1.3版本之前</h3>
+<h3 id="Versions_prior_to_JavaScript_1.3">JavaScript 1.3版本之前</h3>
<pre class="syntaxbox"><code>dateObj.setHours(<em>hoursValue</em>) </code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>hoursValue</code></dt>
@@ -33,15 +33,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours
<dd>一个 0 到 999 的数字,表示微秒数,如果指定了 <code>msValue</code> 参数,则必须同时指定 <code>minutesValue</code> 和 <code>secondsValue</code> 参数。</dd>
</dl>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>如果不指定 <code>minutesValue</code>,<code>secondsValue</code> 和 <code>msValue</code> 参数,则会使用{{jsxref("Date.getMinutes", "getMinutes()")}},{{jsxref("Date.getSeconds", "getSeconds()")}} 和{{jsxref("Date.getMilliseconds", "getMilliseconds()")}} 方法的返回值。</p>
<p>如果有一个参数超出了合理范围,<code>setHours</code> 会相应地更新日期对象中的日期信息。例如,如果为 <code>secondsValue</code> 指定了 100,则分钟会加 1,然后秒数使用 40。</p>
-<h2 id="Examples" name="Examples">例子</h2>
+<h2 id="Examples">例子</h2>
-<h3 id="Example:_Using_setHours" name="Example:_Using_setHours">例子:使用<code>setHours方法</code></h3>
+<h3 id="Example:_Using_setHours">例子:使用<code>setHours方法</code></h3>
<pre class="brush:js">var theBigDay = new Date();
theBigDay.setHours(7);
@@ -78,7 +78,7 @@ theBigDay.setHours(7);
<p>{{Compat("javascript.builtins.Date.setHours")}}</p>
-<h2 id="See_Also" name="See_Also">相关链接</h2>
+<h2 id="See_Also">相关链接</h2>
<ul>
<li>{{jsxref("Date.prototype.getHours()")}}</li>