Getting the text from a drop-down box

后端 未结 12 2338
无人及你
无人及你 2020-11-30 02:23

This gets the value of whatever is selected in my dropdown menu.

document.getElementById(\'newSkill\').value

I cannot however find out what

12条回答
  •  时光说笑
    2020-11-30 02:49

    Simply You can use Jquery instead of Javascript

    $("#yourdropdownid option:selected").text();
    

    Try This.

提交回复
热议问题