The following code works:
$("#select-id").change(function(){
var cur_value = $('#select-id option:selected').text();
. . .
});
How to refactor the second line to:
var cur_value = $(this).***option-selected***.text();
What do you use for ***option-selected***
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…