본문 바로가기
JavaScript

[jQuery] each 반복문을 통해 인덱스 및 요소 구하기

by palbokdev 2022. 7. 17.
$('#list option').each(function(index, element){
  alert("Iteration: " + index)
});

 

출처 : https://stackoverflow.com/questions/4341977/jquery-each-index