It's a bit difficult to determine what you are looking for.
Try putting sample code at a place you can share it and show what you're looking for.
I've guessed at what you're looking for and created a nice jsbin that you can run to see. Try this :
JS Bin - Collaborative JavaScript Debugging[
^]
That will select all of the checkboxes and select none of them.
You can probably work out what you want from there.