//购物车-
function Jian(obj) { var n = $(obj).prev().val(); var num = parseInt(n) - 1; if (num == 0) { layer.msg("购物数量不能小于0"); return false; } $(obj).prev().val(num); }//购物车+ function Jia(obj) { var n = $(obj).next().val(); var num = parseInt(n) + 1; if (num == 0) { return; } $(obj).next().val(num); }