var payTypeList = new Array(); $(".add-tbody").each(function(){ payTypeList.push($(this).val()); }); var payType = ","+payTypeList.join(",")+",";