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/math/trunc | |
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/math/trunc')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/math/trunc/index.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/trunc/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/trunc/index.html index 485a96e75d..3568f3bd78 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/math/trunc/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/math/trunc/index.html @@ -12,11 +12,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/trunc <p><code><strong>Math.trunc()</strong></code> 方法会将数字的小数部分去掉,只保留整数部分。</p> -<h2 id="Syntax" name="Syntax">语法</h2> +<h2 id="Syntax">语法</h2> <pre class="syntaxbox">Math.trunc(<em>value</em>)</pre> -<h3 id="Parameters" name="Parameters">参数</h3> +<h3 id="Parameters">参数</h3> <dl> <dt><code>value</code></dt> @@ -27,7 +27,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/trunc <p>给定数字的整数部分</p> -<h2 id="Description" name="Description">描述</h2> +<h2 id="Description">描述</h2> <p>不像 <code>Math</code> 的其他三个方法: {{jsxref("Math.floor()")}}、{{jsxref("Math.ceil()")}}、{{jsxref("Math.round()")}} ,<code>Math.trunc()</code> 的执行逻辑很简单,仅仅是<strong>删除</strong>掉数字的小数部分和小数点,不管参数是正数还是负数。</p> @@ -35,7 +35,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/trunc <p>因为 <code>trunc()</code> 是 <code>Math</code> 对象的静态方法,你必须用 <code>Math.trunc()</code> 来使用,而不是调用你创建的 <code>Math</code> 对象的一个实例方法(<code>Math</code> 没有构造函数)</p> -<h2 id="Examples" name="Examples">示例</h2> +<h2 id="Examples">示例</h2> <pre class="brush:js">Math.trunc(13.37) // 13 Math.trunc(42.84) // 42 |