aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/math/abs
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/math/abs
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/math/abs')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/math/abs/index.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/abs/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/abs/index.html
index 397ad9724b..e86e8064c2 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/math/abs/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/math/abs/index.html
@@ -9,24 +9,24 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/abs
<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mrow><mo lspace="0em" rspace="thinmathspace">Math.abs</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mrow><mo stretchy="false">|</mo><mi>x</mi><mo stretchy="false">|</mo></mrow><mo>=</mo><mrow><mo>{</mo><mtable columnalign="left left"><mtr><mtd><mi>x</mi></mtd><mtd><mtext>if</mtext><mspace width="1em"></mspace><mi>x</mi><mo>≥</mo><mn>0</mn></mtd></mtr><mtr><mtd><mo>-</mo><mi>x</mi></mtd><mtd><mtext>if</mtext><mspace width="1em"></mspace><mi>x</mi><mo>&lt;</mo><mn>0</mn></mtd></mtr></mtable></mrow></mrow><annotation encoding="TeX">{\mathtt{\operatorname{Math.abs}(x)}} = {|x|} = \begin{cases} x &amp; \text{if} \quad x \geq 0 \\ -x &amp; \text{if} \quad x &lt; 0 \end{cases} </annotation></semantics></math></p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox">Math.abs(<em>x</em>);</pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>x</code></dt>
<dd>一个数值</dd>
</dl>
-<h2 id="Description" name="Description">说明</h2>
+<h2 id="Description">说明</h2>
<p><code>由于 Math.abs()</code> <code>是</code> <code>Math</code> 中的一个静态方法,你应该通过 <code>Math.abs()</code> <code>调用。</code>(Math 不是构造器)</p>
-<h2 id="Examples" name="Examples">示例</h2>
+<h2 id="Examples">示例</h2>
-<h3 id="Example:_Math.abs_behavior" name="Example:_Math.abs_behavior"><code>Math.abs()函数的行为</code></h3>
+<h3 id="Example:_Math.abs_behavior"><code>Math.abs()函数的行为</code></h3>
<p>传入一个非数字形式的字符串或者 undefined/empty 变量,将返回 <code>NaN</code>。传入 null 将返回 0。</p>
@@ -115,7 +115,7 @@ Math.abs(); // NaN</pre>
</table>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li>The {{jsxref("Global_Objects/Math", "Math")}} object it belongs to.</li>