diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html')
| -rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html b/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html index 69d14321ee..ad57d66c17 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/object/seal/index.html @@ -18,11 +18,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/seal -<h2 id="Syntax" name="Syntax">语法</h2> +<h2 id="Syntax">语法</h2> <pre class="syntaxbox"><code>Object.seal(<em>obj</em>)</code></pre> -<h3 id="Parameters" name="Parameters">参数</h3> +<h3 id="Parameters">参数</h3> <dl> <dt><code>obj</code></dt> @@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/seal <p>被密封的对象。</p> -<h2 id="Description" name="Description">描述</h2> +<h2 id="Description">描述</h2> <p>通常,一个对象是{{jsxref("Object.isExtensible()", "可扩展的", "", 1)}}(可以添加新的属性)。密封一个对象会让这个对象变的不能添加新属性,且所有已有属性会变的不可配置。属性不可配置的效果就是属性变的不可删除,以及一个数据属性不能被重新定义成为访问器属性,或者反之。但属性的值仍然可以修改。尝试删除一个密封对象的属性或者将某个密封对象的属性从数据属性转换成访问器属性,结果会静默失败或抛出{{jsxref("TypeError")}}(在{{jsxref("Strict_mode", "严格模式", "", 1)}} 中最常见的,但不唯一)。</p> @@ -41,7 +41,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/seal <p>返回被密封对象的引用。</p> -<h2 id="Examples" name="Examples">例子</h2> +<h2 id="Examples">例子</h2> <pre class="brush: js">var obj = { prop: function() {}, @@ -132,7 +132,7 @@ Object.seal(1); </tbody> </table> -<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容</h2> +<h2 id="Browser_compatibility">浏览器兼容</h2> <div> @@ -140,7 +140,7 @@ Object.seal(1); <p>{{Compat("javascript.builtins.Object.seal")}}</p> </div> -<h2 id="See_also" name="See_also">相关链接</h2> +<h2 id="See_also">相关链接</h2> <ul> <li>{{jsxref("Object.isSealed()")}}</li> |
