« Firefox 1.5.0.4 Released - 更新 http://firefox.ipcn.org 提供镜像下载 | Main | Squid 2.6.PRE2 release »
June 4, 2006
[个人打车信息] 超过19公里应该重新打表
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2006/06/04/000998.html http://windtear.net/archives/2006/06/04/000998.html [个人打车信息] 超过19公里应该重新打表 19公里是个临界点 (适用2元的车 1.6元的车临界点是22公里) 对比计算器: 里程: 一气贯通: 15公里重连: 去掉parseFloat的javascript代码如下: var CalcMile=(Mile-3); var price=2; var Together=0; var Onebyeone=0; if (CalcMile<=0) {Together=10;Onebyeone=10;} else if (CalcMile>0&&Mile<=15) {Together=10+CalcMile*price;Onebyeone=Together;} else if (Mile>=15&&Mile<=18) {Together=10+12*price+(Mile-15)*price*1.5; Onebyeone=10+12*price+10;} else if (Mile>=18) {Together=10+12*price+(Mile-15)*price*1.5; Onebyeone=10+12*price+10+(Mile-18)*price;} |
Posted by windtear at June 4, 2006 11:19 PM