[Javascript] counting checkboxes

Steve Clay sclay at ufl.edu
Thu Feb 16 09:01:00 CST 2006


Thursday, February 16, 2006, 6:27:32 AM, Michael Borchers wrote:
> but by the way: can i get a Element by input Type? f.e. checkbox or text?!

http://simon.incutio.com/js/getElementsBySelector.html
alert(document.getElementsBySelector('input[type="checkbox"]').length);

Or, more powerful, http://jquery.com/ I haven't used it, but it includes
some very nice DOM querying/filtering methods.

Steve
-- 
http://mrclay.org/




More information about the Javascript mailing list