How do I grab and send a dropdown's display text instead of value using jquery

后端 未结 1 873
长情又很酷
长情又很酷 2021-01-27 03:10

I am using this bit of jquery to put the value selected from my dropdown into a hidden text field. This works beautifully - got it from one of the folks on this forum!!!, but I

相关标签:
1条回答
  • 2021-01-27 04:12

    Use .text() instead of .val() on the selected option

    $(this).find(":selected").text()
    

    ids should start with a letter, too

    0 讨论(0)
提交回复
热议问题