jQuery 길이 속성

❮ 제이쿼리 속성

예시

<li> 요소 수 경고:

$("button").click(function(){
  alert($("li").length);
});

정의 및 사용

length 속성은 jQuery 객체의 요소 수를 포함합니다.


통사론

$(selector).length

❮ 제이쿼리 속성