获取后台全选选中的ID值

var ids = [];
$("[name='ids[]']").each(function() {
if ($(this).prop("checked") == true) {
ids.push($(this).val());
}
});