Based on your example HTML code, here’s one way to get the displayed text of the currently selected option:
var skillsSelect = document.getElementById("newSkill");
var selectedText = skillsSelect.options[skillsSelect.selectedIndex].text;
More Related Contents:
- How can I tell if a DOM element is visible in the current viewport?
- Appending HTML string to the DOM
- Manipulating innerHTML removes the event handler of a child element? [duplicate]
- Detecting if a browser is in full screen mode
- Is it possible to programmatically catch all events on the page in the browser?
- Why does JavaScript navigator.appName return Netscape for Safari, Firefox and Chrome?
- How to reduce the length of a video using JavaScript? [closed]
- Remove all child elements of a DOM node in JavaScript
- Changing website favicon dynamically
- JavaScript, browsers, window close – send an AJAX request or run a script on window closing
- What is the difference between children and childNodes in JavaScript?
- What is my script src URL?
- How to add/remove a class in JavaScript?
- How can I run a program or batch file on the client side?
- Why is the loop assigning a reference of the last index element to? [duplicate]
- How can I remove all CSS classes using jQuery/JavaScript?
- Setting minimum size limit for a window minimization of browser?
- Alternative version for Object.values()
- Can dynamically loaded JavaScript be unloaded?
- JavaScript moving element in the DOM
- Where are constructors such as, `new Image()` and `new Option()`, documented?
- How to append text to a div element?
- How can I know whether refresh button or browser back button is clicked in Firefox? [duplicate]
- How to store persistent data client side
- Can I add arbitrary properties to DOM objects?
- Breaking JavaScript execution when cookie is set
- Is there any way to find an element in a documentFragment?
- How to make browser full screen using F11 key event through JavaScript [duplicate]
- HTML5 Video autoplay with sound unmuted
- How do I dynamically adjust css stylesheet based on browser width?