問題描述:當(dāng)輸入的內(nèi)容和列表中的sku值相同時(shí)復(fù)核數(shù)量加一,當(dāng)輸入內(nèi)容和表中的sku匹配不上時(shí)彈出‘查無此商品信息’,為什么有時(shí)候if、else部分都會(huì)彈出,有時(shí)候就正常,求指教 用‘全局變量’flag無效,求指教//enter$('.confirm_review').click(function () {$('tbody tr td:nth-child(2)').each(function(index,val){ if($(this).html()==$('.nav-input').val()){ var count = $(this).parent().children().eq(-2).html();
count++;
$(this).parent().children().eq(-2)[0].innerHTML= count;
}else{
layer.msg('訂單中無此條碼的商品',{icon:5});
}
});});
- 1 回答
- 0 關(guān)注
- 603 瀏覽
添加回答
舉報(bào)
0/150
提交
取消