For the below html code snippet ,we can retreive the selected(checked) checkbox values into an javascript array for further processing.

<div>
<input type="checkbox" name="list_group" value="one" />
<input type="checkbox" name="list_group" value="two" />
<input type="checkbox" name="list_group" value="three" />
<input type="checkbox" name="list_group" value="four" />
<input type="checkbox" name="list_group" value="five" />
</div>

jQuery code to be used on onready or onclick event.

var values = new Array();
$.each($("input[@name='list_group']:checked"), function() {
values.push($(this).val());
});

Related posts:

  1. How to create a for loop in jquery