Usually the way you would do that is to group related checkboxes, possibly into multiple groups, then for each realted group have a "Select all in group" checkbox or button that calls a javascript function to check them all. A quick DDG search found
this useful description of a simple method - there are many more.
The JQuery javascript libs would simplify it a bit as well.
I am not aware of a pre-canned method of doing it exactly as you describe it, checking click-drag selected checkboxes, but some similar javascript should be able to handle that too, simply trigger the check function on the selection.