X龙@China .Net 'blog

需要的不仅仅是工作,而是通过努力得来的美好将来。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

js保留小数点位

Posted on 2010-12-03 09:52  X龙  阅读(169)  评论(0编辑  收藏  举报
function fomatFloat(src, pos) {
                
return Math.round(src * Math.pow(10, pos)) / Math.pow(10, pos);
            }


点击这里给我发消息http://wp.qq.com/index.html