jQuery Get Selected Option From Dropdown

前端 未结 30 3846
梦如初夏
梦如初夏 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:41

    I had the same issue and I figured out why it was not working on my case
    The html page was divided into different html fragments and I found that I have another input field that carries the same Id of the select, which caused the val() to be always empty
    I hope this saves the day for anyone who have similar issue.

提交回复
热议问题