<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Math</title> </head> <body> </body> <script> alert(Math.random()); //返回[0,1)的任何一个随机数 alert(Math.round(3.3));//四舍五入 alert(Math.max(1,2));//返回一个最大值 alert(Math.pow(2,4));//返回2的4次方 </script> </html>
Math
最新推荐文章于 2023-09-21 23:59:14 发布