// try this code //it will get all dropdown and their values, you can use according to your requirements. $("select").each(function(e,i){ alert(e+$(i).val()); }); //e: it will be index of dropdownlist //i: it is current dropdownlist //here is code for id $("select").each(function(e,i){ alert(e+$(i).attr("id")); });//it will get each dropdown index and id
//get id on change of dropdownlist. $("select").change(function() { alert(this.id); } );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)