aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/functions/arguments
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/functions/arguments
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/functions/arguments')
-rw-r--r--files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/functions/arguments/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/functions/arguments/length/index.html8
3 files changed, 13 insertions, 13 deletions
diff --git a/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html b/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
index a2847f3683..65e9123fe5 100644
--- a/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/arguments/callee/index.html
@@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Functions/arguments/callee
<p><code><strong>arguments.callee </strong></code>属性包含当前正在执行的函数。</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p><strong><code>callee</code></strong> 是 <code>arguments</code> 对象的一个属性。它可以用于引用该函数的函数体内当前正在执行的函数。这在函数的名称是未知时很有用,例如在没有名称的函数表达式 (也称为“匿名函数”)内。</p>
@@ -82,9 +82,9 @@ sillyFunction();</pre>
<p>如果 JavaScript 解释器不能保证所有提供的参数数量在被调用的时候都存在,那么它需要在行内代码插入检查,或者不能内联这个函数。现在在这个特殊例子里一个智能的解释器应该能重排检查而更优,并检查任何将不用到的值。然而在许多的情况里那是不可能的,也因此它不能够内联。 </p>
-<h2 id="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function" name="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function">例子</h2>
+<h2 id="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function">例子</h2>
-<h3 id="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function" name="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function">在匿名递归函数中使用 <code>arguments.callee</code></h3>
+<h3 id="Example.3A_Using_arguments.callee_in_an_anonymous_recursive_function">在匿名递归函数中使用 <code>arguments.callee</code></h3>
<p>递归函数必须能够引用它本身。很典型的,函数通过自己的名字调用自己。然而,匿名函数 (通过 <a href="/en-US/docs/JavaScript/Reference/Operators/function" title="JavaScript/Reference/Operators/Special/function">函数表达式</a> 或者 <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Function" title="JavaScript/Reference/Global_Objects/Function">函数构造器 </a>创建</code>) 没有名称。因此如果没有可访问的变量指向该函数,唯一能引用它的方式就是通过 <code>arguments.callee</code>。</p>
diff --git a/files/zh-cn/web/javascript/reference/functions/arguments/index.html b/files/zh-cn/web/javascript/reference/functions/arguments/index.html
index b00da02c08..8b708b2c37 100644
--- a/files/zh-cn/web/javascript/reference/functions/arguments/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/arguments/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Functions/arguments
<p>{{EmbedInteractiveExample("pages/js/functions-arguments.html")}}</p>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<div class="blockIndicator note">
<p><strong>Note:</strong> If you're writing ES6 compatible code, then <a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/rest_parameters">rest parameters</a> should be preferred.</p>
@@ -88,7 +88,7 @@ number
<pre class="brush: js">var args = Array.from(arguments);
var args = [...arguments];</pre>
-<h2 id="Properties" name="Properties">属性</h2>
+<h2 id="Properties">属性</h2>
<dl>
<dt><code><a href="/zh-CN/docs/Web/JavaScript/Reference/Functions/arguments/callee" title="JavaScript/Reference/Functions_and_function_scope/arguments/callee">arguments.callee</a></code></dt>
@@ -109,7 +109,7 @@ var args = [...arguments];</pre>
<p>注意: 在严格模式下,<code>arguments</code>对象已与过往不同。<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/@@iterator">arguments[@@iterator]</a></code>不再与函数的实际形参之间共享,同时caller属性也被移除。</p>
</div>
-<h2 id="Examples" name="Examples">例子</h2>
+<h2 id="Examples">例子</h2>
<h3 id="遍历参数求和">遍历参数求和</h3>
@@ -125,7 +125,7 @@ add() // 0
add(1) // 1
add(1,2,3,4); // 10</pre>
-<h3 id="Example_Defining_function_that_concatenates_several_strings" name="Example:_Defining_function_that_concatenates_several_strings">定义连接字符串的函数</h3>
+<h3 id="Example_Defining_function_that_concatenates_several_strings">定义连接字符串的函数</h3>
<p>这个例子定义了一个函数来连接字符串。这个函数唯一正式声明了的参数是一个字符串,该参数指定一个字符作为衔接点来连接字符串。该函数定义如下:</p>
@@ -145,7 +145,7 @@ myConcat("; ", "elephant", "giraffe", "lion", "cheetah");
// returns "sage. basil. oregano. pepper. parsley"
myConcat(". ", "sage", "basil", "oregano", "pepper", "parsley");</pre>
-<h3 id="Example_Defining_a_function_that_creates_HTML_lists" name="Example:_Defining_a_function_that_creates_HTML_lists">定义创建HTML列表的方法</h3>
+<h3 id="Example_Defining_a_function_that_creates_HTML_lists">定义创建HTML列表的方法</h3>
<p>这个例子定义了一个函数通过一个字符串来创建HTML列表。这个函数唯一正式声明了的参数是一个字符。当该参数为 "<code>u</code>" 时,创建一个无序列表 (项目列表);当该参数为 "<code>o</code>" 时,则创建一个有序列表 (编号列表)。该函数定义如下:</p>
@@ -259,7 +259,7 @@ func(); // undefined
<p>{{Compat("javascript.functions.arguments")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>{{jsxref("Function")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/functions/arguments/length/index.html b/files/zh-cn/web/javascript/reference/functions/arguments/length/index.html
index 3bf25335f4..9d0892226a 100644
--- a/files/zh-cn/web/javascript/reference/functions/arguments/length/index.html
+++ b/files/zh-cn/web/javascript/reference/functions/arguments/length/index.html
@@ -11,13 +11,13 @@ translation_of: Web/JavaScript/Reference/Functions/arguments/length
<pre class="syntaxbox">arguments.length</pre>
-<h2 id="Description" name="Description">描述</h2>
+<h2 id="Description">描述</h2>
<p>arguments.length表示的是实际上向函数传入了多少个参数,这个数字可以比形参数量大,也可以比形参数量小(形参数量的值可以通过<a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Function/length" title="JavaScript/Reference/Global Objects/Function/length">Function.length</a>获取到).</p>
-<h2 id="Examples" name="Examples">例子</h2>
+<h2 id="Examples">例子</h2>
-<h3 id="Example:_Using_arguments.length" name="Example:_Using_arguments.length">例子: 使用<code>arguments.length</code></h3>
+<h3 id="Example:_Using_arguments.length">例子: 使用<code>arguments.length</code></h3>
<p>这个例中,我们定义了一个可以相加任意个数字的函数.</p>
@@ -68,7 +68,7 @@ translation_of: Web/JavaScript/Reference/Functions/arguments/length
<p>{{Compat("javascript.functions.arguments.length")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Function/length" title="JavaScript/Reference/Global_Objects/Function/length">Function.length</a></li>