$(document).on('click', '.qq_item_plus', function() { \n var qty_input = $(this).closest('.qcart_item').find('.qq_qty');\n var qty_val = parseFloat(qty_input.val());\n\n if (qty_val < 5) {\n qty_input.val(qty_val + 1);\n } else {\n alert("Max quantity is 5.");\n }\n\n qq_caculate_product();\n});

jQuery .qq_qty Input Limit: Preventing Overflows with an Alert

原文地址: https://www.cveoy.top/t/topic/qdYF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录