//计算总价 function cartTotal(){ var total = 0;
//循环计算的列,选中计算的数量和价格
//accAdd为精BigDecimal准计算方法 $.each($(".eatmenu_foot"), function() { var priceSplit = $(this).children(":first").text().split('¥'); var price = parseInt(priceSplit[1]); var count = $(this).children(":last-child").children("input").val(); total = accAdd(total,accMul(price,count)); }); $("#sum").text("¥"+total); }
jquery购物车计算总价
猜你喜欢
转载自www.cnblogs.com/ssjf/p/10218136.html
今日推荐
周排行