diff options
| author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:07 +0800 |
|---|---|---|
| committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
| commit | c40612041809fe289aba58aefa170bbe784aba1f (patch) | |
| tree | 8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/error/tostring | |
| parent | 12a899ab8540bc84f56a0dc6491be80a48499d49 (diff) | |
| download | translated-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/tostring')
| -rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/error/tostring/index.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/tostring/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/tostring/index.html index a7e6a10ace..395d61aee2 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/error/tostring/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/error/tostring/index.html @@ -5,11 +5,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Error/toString --- <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>toString()</strong></code> 方法返回一个指定的错误对象(Error object)的字符串表示。</p> -<h2 id="Syntax" name="Syntax">语法</h2> +<h2 id="Syntax">语法</h2> <pre class="syntaxbox"><code><em>e</em>.toString();</code></pre> -<h2 id="Description" name="Description">描述</h2> +<h2 id="Description">描述</h2> <p>{{jsxref("Error")}} 对象覆盖了 {{jsxref("Object.prototype.toString()")}} 方法。该方法实现如下:(假定 <code>Object</code> 和 <code>String</code> 没有被更改):</p> <pre class="brush:js">Error.prototype.toString = function() { @@ -33,7 +33,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Error/toString return name + ": " + msg; }; </pre> -<h2 id="Example" name="Example">示例</h2> +<h2 id="Example">示例</h2> <pre class="brush:js">var e = new Error("fatal error"); print(e.toString()); // "Error: fatal error" @@ -123,7 +123,7 @@ print(e.toString()); // "hello" </tbody> </table> </div> -<h2 id="See_also" name="See_also">相关链接</h2> +<h2 id="See_also">相关链接</h2> <ul> <li>{{jsxref("Error.prototype.toSource()")}}</li> </ul> |
