//取绝对值
document.write(Math.abs(-1)+"<br>");
//向上取整
document.write(Math.ceil(12.2)+"<br>");
document.write(Math.ceil(-12.2)+"<br>");
//向下取整
document.write(Math.floor(12.8)+"<br>");
//次幂
document.write(Math.pow(3,2)+"<br>");
//随机数
document.write(Math.random()+"<br>");
常用取值
猜你喜欢
转载自www.cnblogs.com/G-qz/p/10708674.html
今日推荐
周排行