Get selected option from select element

后端 未结 12 976
温柔的废话
温柔的废话 2020-12-08 01:45

I am trying to get the selected option from a dropdown and populate another item with that text, as follows. IE is barking up a storm and it doesn\'t work in Firefox:

<
12条回答
  •  执念已碎
    2020-12-08 02:17

    if you have this already and use jquery this will be your answer:

    $($(this)[0].selectedOptions[0]).text()

提交回复
热议问题