Home JS常用函数
Post
Cancel

JS常用函数

Math.abs()取绝对值

1
2
var a = -20;
var b = Math.abs(a);
This post is licensed under CC BY 4.0 by the author.