Click here to Skip to main content
15,905,229 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi in my page have several checkbox .and i want find checkboxes which select it and put in Array
Posted
Updated 10-Jul-11 5:23am
v2

1 solution

Hi, thoses lines should be helpful for you.

SQL
var selectedItems = new Array();



$("input:checked").each(function() {selectedItems.push($(this).val());});

alert( 'the number of selected checkboxs is: ' + selectedItems.length)  ;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900