英 [?bz]
abbr.acrylonitrile-butadiène-styrène acrylonitrile-butadiène-styrène;absence absence;absorption absorption;absorber (ent) absorption
méthode javascript abs() syntaxe
Fonction?: Renvoie la valeur absolue du nombre.
Syntaxe : Math.abs(x)
Paramètres : x Obligatoire. Doit être une valeur numérique.?
Retour?: La valeur absolue de x.
méthode javascript abs() exemple
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script type="text/javascript"> //取得正數(shù)和負(fù)數(shù)的絕對值 document.write(Math.abs(7.25) + "<br />") document.write(Math.abs(-7.25) + "<br />") document.write(Math.abs(7.25-10)) </script> </body> </html>
Exécuter l'instance ?
Cliquez sur le bouton ??Exécuter l'instance?? pour afficher l'instance en ligne