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
$("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!