通过将数组“checkbox_values”放入请求中解决了该问题。Tnx 为您提供时间和帮助!
var checkbox_values = new Array();
var subscriber_id = jQuery('#subscriber_id').prop('value');
var subscriber_name = jQuery('#subscriber_name').val();
var subscriber_mail = jQuery('#subscriber_mail').val();
jQuery(':checkbox:checked').each(function() {
checkbox_values.push(jQuery(this).val())
});
jQuery.ajax({
async: false,
url: nieuwsbrief.updatesubscriber,
type: 'POST',
data: { subscriber_id: subscriber_id,
subscriber_name: subscriber_name,
subscriber_mail: subscriber_mail,
checkbox_values: checkbox_values.join('|')
},
success: function(data) {
alert(data);
}
});