JavaScript中的Math.log10()函数
Math对象的log10()函数接受一个数字,并返回给定数字的自然对数(以10为底)。
语法
其语法如下
Math.log10(48);
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.log10(48);
document.write("Result: "+result);
</script>
</body>
</html>输出结果
Result: 1.6812412373755872