I
I
Ilya2014-09-30 03:00:21
JavaScript
Ilya, 2014-09-30 03:00:21

How to pass an array of checked checkboxes?

How to pass an array of checked checkboxes using ajax to the server? The server uses the Codeigniter framework. Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nazar Mokrinsky, 2014-09-30
@ArtMavir

var checked = [];
$(':checkbox:checked').each(function () {
    checked.push($(this).val());
});

A
Alexander Taratin, 2014-09-30
@Taraflex

malsup.com/jquery/form

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question