var temp = 2.222222222;
temp.toFixed(2);
//得出结果2.22

 

posted on 2017-10-16 19:24  miaoying  阅读(173)  评论(0编辑  收藏  举报