diff options
author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:14:18 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | d44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch) | |
tree | 4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html | |
parent | f45e9e070c93ebbd83d488bdd775987a4d75c201 (diff) | |
download | translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.gz translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.bz2 translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.zip |
fix yari h2m dry run errors (zh-CN)
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html')
-rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html b/files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html index eaa80b6179..9e1dbd1322 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/parsefloat/index.html @@ -28,9 +28,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/parseFloat <h3 id="返回值">返回值</h3> -<dl> - <dd>给定值被解析成浮点数。如果给定值不能被转换成数值,则会返回 {{jsxref("NaN")}}。</dd> -</dl> +<p>给定值被解析成浮点数。如果给定值不能被转换成数值,则会返回 {{jsxref("NaN")}}。</p> <h2 id="描述">描述</h2> @@ -55,7 +53,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/parseFloat <p>下面的例子都返回<strong>3.14</strong></p> -<pre class="brush: js line-numbers language-js">parseFloat(3.14); +<pre class="brush: js">parseFloat(3.14); parseFloat('3.14'); parseFloat(' 3.14 '); parseFloat('314e-2'); @@ -74,7 +72,7 @@ parseFloat({ toString: function() { return "3.14" } });</pre> <p>以下例子均返回 <code>900719925474099300</code>,当整数太大以至于不能被转换时将失去精度。</p> -<pre class="brush: js line-numbers language-js">parseFloat(900719925474099267n); +<pre class="brush: js">parseFloat(900719925474099267n); parseFloat('900719925474099267n');</pre> <h2 id="规范">规范</h2> |