js 取绝对值,最大最小值

1.取绝对值:

Math.abs(-1)   //1

2.取最大值

Math.max(a,b)

3.取最小值:

Math.min(a,b)

猜你喜欢

转载自blog.csdn.net/yang__k/article/details/82178440