jQuery .each() index?

后端 未结 5 2003
盖世英雄少女心
盖世英雄少女心 2021-01-31 01:03

I am using

$(\'#list option\').each(function(){
//do stuff
});

to loop over the options in a list. I am wondering how I could get the index of

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 01:30

    $('#list option').each(function(intIndex){
    //do stuff
    });
    

提交回复
热议问题