From 563ca0a35e98678e2b7d5f154f31f496851e8d60 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:07 +0800 Subject: remove code tag inside pre tag for zh-CN --- .../web/javascript/reference/global_objects/parsefloat/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/parsefloat') 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 21d4e0bfbd..f32b3bbf90 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 @@ -55,13 +55,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/parseFloat

下面的例子都返回3.14

-
parseFloat(3.14);
+
parseFloat(3.14);
 parseFloat('3.14');
 parseFloat('  3.14  ');
 parseFloat('314e-2');
 parseFloat('0.0314E+2');
 parseFloat('3.14some non-digit characters');
-parseFloat({ toString: function() { return "3.14" } });
+parseFloat({ toString: function() { return "3.14" } });

parseFloat返回NaN

@@ -74,8 +74,8 @@ parseFloat({ toString: function() { return "3.14" } });

以下例子均返回 900719925474099300,当整数太大以至于不能被转换时将失去精度。

-
parseFloat(900719925474099267n);
-parseFloat('900719925474099267n');
+
parseFloat(900719925474099267n);
+parseFloat('900719925474099267n');

规范

-- cgit v1.2.3-54-g00ecf