round

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