From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/global_objects/math/log10/index.html | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/math/log10/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/math/log10') diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/log10/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/log10/index.html new file mode 100644 index 0000000000..7819f922e8 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/math/log10/index.html @@ -0,0 +1,113 @@ +--- +title: Math.log10() +slug: Web/JavaScript/Reference/Global_Objects/Math/log10 +translation_of: Web/JavaScript/Reference/Global_Objects/Math/log10 +--- +
+
{{JSRef("Global_Objects", "Math")}}
+
+ +

概述

+ +

Math.log10() 函数返回一个数字以 10 为底的对数.

+ +

语法

+ +
Math.log10(x)
+ +

参数

+ +
+
x
+
任意数字.
+
+ +

描述

+ +

如果传入的参数小于 0, 则返回 NaN.

+ +

示例

+ +
Math.log10(10)   // 1
+Math.log10(100)  // 2
+Math.log10("100")// 2
+Math.log10(1)    // 0
+Math.log10(0)    // -Infinity
+Math.log10(-2)   // NaN
+Math.log10("foo")// NaN
+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES6', '#sec-math.log10', 'Math.log10')}}{{Spec2('ES6')}}Initial definition.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatNo}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf