2 Votes Vote

Getting Selected name of a dropdown using Javascript

Posted by topdog 598 days ago Questions| dropdown calendar javascript All

I have created one dropdown box

<select name="select" id="selectId">
<option id="" value="calendar_Second_Calendar_1285942672.xml">Second Calendar</option>
<option id="" value="calendar_First_Calendar_1285932160.xml">First Calendar</option>
</select>

I can get the selected drop down box value using

document.getElementById("selectId").value

How i can get the name where user is seeing i mean (Second Calendar or First Calendar)

Originally asked by: THOmas on Stack Overflow

Discuss Bury


Who Voted for this Question