forum

Home / DeveloperSection / Forums / Getting the text from a drop-down box

Getting the text from a drop-down box

Anonymous User213214-Feb-2013

Hi MindStickians!

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

document.getElementById('newSkill').value

For those not sure, here's the HTML for a drop down box.

<select name="newSkill" id="newSkill">
    <option value="1">A skill</option>
    <option value="2">Another skill</option>
    <option value="3">Yet another skill</option>
</select>

Thanks in advance


Updated on 16-Feb-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By