Select option value | Sololearn: Learn to code for FREE!


Select option value

I create a test and I can’t get the value of selected item in <select><option> how can I do this? I tried a lot of codes...

3/10/2019 12:02:38 PM

Sonia Golubkova

3 Answers

New Answer


var sel = document.getElementById("sel"); // select element var selected = sel.options[sel.selectedIndex].value;


its actualy worked! thank you!!


Can you help an amateur