摘要: $num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num); echo $format_num; //10 阅读全文
posted @ 2018-06-21 18:44 bwteacher 阅读(116) 评论(0) 推荐(0)
摘要: 一、JS文件/*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2006, 2014 Klaus Hartl * Released under the MIT lice 阅读全文
posted @ 2018-06-21 16:03 bwteacher 阅读(357) 评论(0) 推荐(0)