编辑文本后点击显示结果
返回网页教程首页
<html> <head> <title>用Math.max在众多数值里返回一个最大值的Javascript示例</title> </head> <body> <script type="text/javascript"> document.write(Math.max(2,6,12,3,9,45,7)) </script> <p>该Javascript示例解释:用Math.max(number1,number2,number3,...numberN)可以在n个数值中返回一个最大值。 </p> </body> </html>