jQuery Get Selected Option From Dropdown

前端 未结 30 4053
梦如初夏
梦如初夏 2020-11-22 02:56

Usually I use $(\"#id\").val() to return the value of the selected option, but this time it doesn\'t work. The selected tag has the id aioConceptName

30条回答
  •  我寻月下人不归
    2020-11-22 03:19

    For anyone who found out that best answer don't work.

    Try to use:

      $( "#aioConceptName option:selected" ).attr("value");
    

    Works for me in recent projects so it is worth to look on it.

提交回复
热议问题