var call = 0; $(".table1 .C").each(function (i, v) { if (i > 0) { var vtext = $(v).text().replace("天", "@").replace("时", "@").replace("分", "").replace("0@", "").replace("00", "0").replace("@", "."); if(vtext=="1.0") vtext=8.0; $(v).text(vtext) call += parseFloat(vtext); } }); alert("总计小时:"+call.toFixed(2)+" 总计天数"+parseFloat(call/8).toFixed(2)+"合计:"+parseFloat((call/8)*【日工资】).toFixed(2));