aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html
index 3f86e43049..283fb1e9bd 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/object/getownpropertynames/index.html
@@ -14,7 +14,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNam
<p><strong><code>Object.getOwnPropertyNames()</code></strong>方法返回一个由指定对象的所有自身属性的属性名(包括不可枚举属性但不包括Symbol值作为名称的属性)组成的数组。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">Object.getOwnPropertyNames(<em>obj</em>)</pre>
@@ -29,7 +29,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNam
<p>在给定对象上找到的自身属性对应的字符串数组。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><code>Object.getOwnPropertyNames()</code> 返回一个数组,该数组对元素是 <code>obj</code>自身拥有的枚举或不可枚举属性名称字符串。 数组中枚举属性的顺序与通过 {{jsxref("Statements/for...in", "for...in")}} 循环(或 {{jsxref("Object.keys")}})迭代该对象属性时一致。数组中不可枚举属性的顺序未定义。</p>
@@ -109,7 +109,7 @@ console.log(nonenum_only);</pre>
<pre>注:<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter">Array.filter(filt_func)方法</a>创建一个新数组, 其包含通过所提供函数实现的测试的所有元素。</pre>
-<h2 id="Notes" name="Notes">提示</h2>
+<h2 id="Notes">提示</h2>
<p>在 ES5 中,如果参数不是一个原始对象类型,将抛出一个 {{jsxref("TypeError")}}  异常。在 ES2015 中,非对象参数被强制转换为对象 <strong>。</strong></p>
@@ -155,7 +155,7 @@ Object.getOwnPropertyNames('foo');
<p>Firefox 28 {{geckoRelease("28")}}之前,<code>Object.getOwnPropertyNames</code> 不会获取到 {{jsxref("Error")}} 对象的属性。该 bug 在后面的版本修复了 ({{bug("724768")}})。</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Enumerability_and_ownership_of_properties" title="Enumerability_and_ownership_of_properties">Enumerability and ownership of properties</a></li>