If form is submitted to a function using onsubmit(), how can I get an array of the values of all checkboxes with name='values[]' ?
EDIT: originally I mentioned radio buttons, this is wrong - checkboxes is correct.
EDIT: line below only gets the value of the first one, obviously
$("input[name='values[]']:checked").val()
Also, how can I get the number of checkboxes that were checked when the form was submitted?