JavaScript四舍五入保留两位小数

梦想的翅膀 2012-03-09

<script type="text/javascript">
  
  var value = 1.1111;
  var result = Math.round(value * 100)/100;
  alert(result);
</script>
 

相关推荐