anyone can tell me how can i check and add checkbox checked values into an array??
get checked values on click and store in an array in javascript.
This is my code.
var chkedVals = new Array; //array to store checked checkboxes value
with(document.your_form_name) {
for(var i = 0; i < checkbox.length; i++){
if(checkbox[i].checked) {
chkedVals.push(checkbox[i].value);
}
}
}