aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/error/message
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitc40612041809fe289aba58aefa170bbe784aba1f (patch)
tree8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/error/message
parent12a899ab8540bc84f56a0dc6491be80a48499d49 (diff)
downloadtranslated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.gz
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.bz2
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.zip
remove name attribute for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/error/message')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/error/message/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/message/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/message/index.html
index e846ff838c..ff4dce9d23 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/error/message/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/error/message/index.html
@@ -5,19 +5,19 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Error/message
---
<div>{{JSRef("Global_Objects", "Error", "EvalError,InternalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError")}}</div>
-<h2 id="Summary" name="Summary">概述</h2>
+<h2 id="Summary">概述</h2>
<p><code><strong>message</strong></code> 属性是有关错误信息,人类易读的(human-readable)描述。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>如果该属性已经被设置,则该属性包含了错误的一个简短描述。<a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a> 大量应用 <code>message</code> 属性在异常方面。 <code>message</code> 属性结合 {{jsxref("Error.prototype.name", "name")}} 属性一起被  {{jsxref("Error.prototype.toString()")}} 方法用来创建错误的字符串形式。</p>
<p>默认情况下,<code>message</code> 属性是一个空字符串,但是可以通过指定一段信息作为 {{jsxref("Error", "Error constructor")}} 的第一个参数创建一个实例来改变该属性值。</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example:_Throwing_a_custom_error" name="Example:_Throwing_a_custom_error">例子:抛出一个自定义错误</h3>
+<h3 id="Example:_Throwing_a_custom_error">例子:抛出一个自定义错误</h3>
<pre class="brush: js">var e = new Error("Could not parse input"); // e.message is "Could not parse input"
throw e;
@@ -102,7 +102,7 @@ throw e;
</table>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Error.prototype.name")}}</li>