Get current value selected in dropdown using jQuery

前端 未结 11 1999
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 11:59

I have a set of dynamically generated dropdown boxes on my page. basically I clone them using jQuery. now I want to capture the value selected on each dropdown on change eve

11条回答
  •  一个人的身影
    2020-12-13 12:48

    To get the text of the selected option

    $("#your_select :selected").text();
    

    To get the value of the selected option

    $("#your_select").val();
    

提交回复
热议问题