function roundTo(base,precision) { var m=Math.pow(10,precision); var a=Math.round(base * m) / m; return a; }
例如:给定数字n=6.3241712,则用roundTo(n,0)得4,用roundTo(n,7)得到6.3241712
上一篇对json的理解?
下一篇Linux CentOS7系统中phpMyAdmin安装配置
苹果iphone如何开启青少年模式
微信青少年模式怎么关闭
Web CSS
网页播放摄像头视频 一种新的实现方式(非ocx方式)
学习js和jQuery总结
Web HTML
Flask简单http接口实现
PHP文件基础操作