1$("select.your-select").change(function(){
2 $(this).children("option:selected").val();
3});
1$("select.country").change(function(){
2 var selectedCountry = $(this).children("option:selected").val();
3 alert("You have selected the country - " + selectedCountry);
4});
1<select id="state">
2 <option value="state1" data-id="1">state1</option>
3 <option value="state2" data-id="2">state2</option>
4 <option value="state3" data-id="3">state3</option>
5</select>
6
7$('#state option[data-id="2"]').val();
8
9//output state2