方法一 乘100,取整,除100
<script>
var m=0;
alert(Math.round(m*100)/100)
</script>
方法二 (最好用)
<script>
alert((1.237*100/100).toFixed(2));
</script>