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/syntaxerror | |
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/syntaxerror')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/syntaxerror/index.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/syntaxerror/index.html b/files/zh-cn/web/javascript/reference/global_objects/syntaxerror/index.html index bdbd1ed86c..6c75432980 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/syntaxerror/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/syntaxerror/index.html @@ -12,15 +12,15 @@ translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError <p><code><strong>SyntaxError</strong></code> 对象代表尝试解析语法上不合法的代码的错误。</p> -<h2 id="Description" name="Description">描述</h2> +<h2 id="Description">描述</h2> <p>当Javascript语言解析代码时,Javascript引擎发现了不符合语法规范的tokens或token顺序时抛出<code>SyntaxError</code>.</p> -<h2 id="Syntax" name="Syntax">语法</h2> +<h2 id="Syntax">语法</h2> <pre class="syntaxbox"><code>new SyntaxError([<var>message</var>[, <var>fileName</var>[, <var>lineNumber</var>]]])</code></pre> -<h3 id="Parameters" name="Parameters">参数</h3> +<h3 id="Parameters">参数</h3> <dl> <dt><code>message</code></dt> @@ -31,30 +31,30 @@ translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError <dd>可选的. 包含引发异常的代码的行号</dd> </dl> -<h2 id="Properties" name="Properties">属性</h2> +<h2 id="Properties">属性</h2> <dl> <dt>{{jsxref("SyntaxError.prototype")}}</dt> <dd><code>允许SyntaxError</code>对象添加属性.</dd> </dl> -<h2 id="Methods" name="Methods">方法</h2> +<h2 id="Methods">方法</h2> <p>全局 <code>SyntaxError</code> 自身不包含任何方法, 但从原型链中继承了一些方法.</p> -<h2 id="SyntaxError_instances" name="SyntaxError_instances"><code>SyntaxError</code> 实例</h2> +<h2 id="SyntaxError_instances"><code>SyntaxError</code> 实例</h2> -<h3 id="Properties_of_SyntaxError_instances" name="Properties_of_SyntaxError_instances">属性</h3> +<h3 id="Properties_of_SyntaxError_instances">属性</h3> <div>{{page('/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype', '属性')}}</div> -<h3 id="Methods_of_SyntaxError_instances" name="Methods_of_SyntaxError_instances">方法</h3> +<h3 id="Methods_of_SyntaxError_instances">方法</h3> <div>{{page('/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype', '方法')}}</div> -<h2 id="Examples" name="Examples">示例</h2> +<h2 id="Examples">示例</h2> -<h3 id="Example:_Catch_an_SyntaxError" name="Example:_Catch_an_SyntaxError">捕获 <code>SyntaxError</code></h3> +<h3 id="Example:_Catch_an_SyntaxError">捕获 <code>SyntaxError</code></h3> <pre class="brush: js">try { eval('hoo bar'); @@ -69,7 +69,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError } </pre> -<h3 id="Example:_Create_an_SyntaxError" name="Example:_Create_an_SyntaxError">创建 <code>SyntaxError</code></h3> +<h3 id="Example:_Create_an_SyntaxError">创建 <code>SyntaxError</code></h3> <pre class="brush: js">try { throw new SyntaxError('Hello', 'someFile.js', 10); |