aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html b/files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html
index 9f2cc2ee8d..62137bbdf6 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/boolean/valueof/index.html
@@ -16,7 +16,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>bool</var>.valueOf()</code></pre>
@@ -24,15 +24,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Boolean/valueOf
<p>给定{{jsxref("Boolean")}}对象的原始值</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>{{jsxref("Boolean")}}的 <code>valueOf</code> 方法返回一个{{jsxref("Boolean")}}对象或{{jsxref("Boolean")}}字面量的原始值作为布尔数据类型。</p>
<p>该方法通常在 JavaScript 内部调用,而不是在代码中显式调用。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example:_Using_valueOf" name="Example:_Using_valueOf">使用 <code>valueOf</code></h3>
+<h3 id="Example:_Using_valueOf">使用 <code>valueOf</code></h3>
<pre class="brush: js">x = new Boolean();
myVar = x.valueOf() // assigns false to myVar
@@ -74,7 +74,7 @@ myVar = x.valueOf() // assigns false to myVar
<p>{{Compat("javascript.builtins.Boolean.valueOf")}}</p>
-<h2 id="See_Also" name="See_Also">相关链接</h2>
+<h2 id="See_Also">相关链接</h2>
<ul>
<li>{{jsxref("Object.prototype.valueOf()")}}</li>