The Math object method in javascript is rounded up, with a decimal number plus 1 for the integer part, rounding, down, and so on, and so on, here's a detailed description of
1. Discard the fractional part and keep the integer part parseint (5/2) 2. Rounding up, there are decimals on the integer part plus 1 math.ceil (5/2) 3, rounded. Math.Round (5/2) 4, rounding up Math.floor (5/2) Math object Ff:firefox, N:netscape, Ie:internet Explo RER method describes the absolute value of the FF N ie ABS (x) return number 1 2 3 acos (x) returns the inverse cosine of the number 1 2 3 ASIN (x) The inverse of the number of strings 1 2 3 atan (x Returns the inverse tangent of x to the value between-PI/2 and PI/2 radians 1 2 3 atan2 (y,x) returns the angle from the x-axis to point (x,y) (between-PI/2 and PI/2 radians) 1 2 3 ceil (x) Rounds a number to the top. 1 2 3 cos (x) returns the cosine of a number of 1 2 3 exp (x) to return the exponent of E. 1 2 3 Floor (x) rounds down a number. 1 2 3 log (x) returns the natural logarithm of the number (base e) 1 2 3 max (x,y) returns the highest value in X and y 1 2 3 min (x,y) returns the lowest value in X and y 1 2 3 pow (x , y) returns the y power of x 1 2 3 random () returns 0 ~ 1 of the random number 1 2 3 round (x) rounded a number to the nearest integer 1 2 3 sin (x) returns the sine of the number 1 2 3& nbsp SQRT (x) returns the square root of the number 1 2 3 tan (x) returns a tangent of a corner of 1 2 3 Tosource () represents the source code of the object 1 4- valueof () returns the original value of a Math object