round
種類
メソッド
書式
Math.round(値)
解説
値を四捨五入します。
サンプルコード
n = eval(prompt("Input Number",0.5));
alert("値を四捨五入すると"+Math.round(n)+"です");
実際のスクリプトを
ダウンロード