function isright(product_id) { var ns = +($('input[name=\'' + product_id + '\']').val().replace(/\D/g,''))||0; if (ns>50) ns=50; if (ns<10) ns=10; $('input[name=\'' + product_id + '\']').val(ns) }