I have a HTML doc like this
<div>
<span>checkbox 1 : </span><input type="checkbox" value="12" />
<span>checkbox 2 : </span><input type="checkbox" value="23" />
<span>checkbox 3 : </span><input type="checkbox" value="38" />
<span>checkbox 4 : </span><input type="checkbox" value="49" />
</div>
<input type="submit" value="Make" onclick="do_it()" />
I want to have an array which contains values of checked checkbox inputs.
for example if checkbox 1 and checkbox 3 are checked I need this array = [12,38].
I have tried several ideas with Javascript and JQuery but I couldn't fix it :(