Home >Web Front-end >Front-end Q&A >What is jquery length
The jquery length property contains the number of elements in the jQuery object. Its usage is as follows: "$("button").click(function(){alert($("li").length);}); ".
The operating environment of this article: windows7 system, jquery3.2.1 version, DELL G3 computer
What is jquery length?
jQuery length property
The length property contains the number of elements in the jQuery object.
Grammar
$(selector).length
Example
Number of output 25edfb22a4f469ecb59f1190150159c6 elements:
$("button").click(function(){ alert($("li").length); });
Recommended learning: "jquery video tutorial 》
The above is the detailed content of What is jquery length. For more information, please follow other related articles on the PHP Chinese website!