1.Math.random()Math.random()返回一个0到1之间的随机数(含0,不含1)。语法:Math.random();//返回随机数代码:
点击按钮显示0(含)到1(不含)之间的随机数: