Home  >  Article  >  Web Front-end  >  jquery statistics check box selection example_jquery

jquery statistics check box selection example_jquery

WBOY
WBOYOriginal
2016-05-16 17:17:271138browse

In the past, I could only use js to judge the traversal and then obtain

Copy code The code is as follows:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


jQuery determines the number of selected check boxes













obtained through jQuery The number of selected items in the checkbox requires the use of jQuery's size() method or length attribute. The following example is to obtain the number of selected items in the checkbox through the length attribute.
Copy code The code is as follows:



Song 1
Song 2
Song 3

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn