return the value of a selected option in a drop-down list
var e = document.getElementById("selectElementID");
var value=e.selectElement.options[e.selectedIndex].value;// get selected option value
var text=e.options[e.selectedIndex].text;//get the selected option text
Also in JavaScript:
- how to edit message discord.js
- jQuery Validate remote method usage to check if username already exists
- expo update react native
- mongoose generate objectid
- how to reverse a string in javascript without using reverse method
- switch statement in javascript
- discord.js create unexipable invite
- jquery get mouse page left and top
- how to make a javascript for loop
- change inside div with jquery
- typecasting javascript
- angular get firebase firestore
- get keys objet javascript
- javascript remove variable from array
- today tomorrow day after tomorrow button html and javascript
- how to get a random element of an array javascript
- in react js how to access history in component
- form validation for email in js
- map object array javascript
- jquery attr
- jquery view image in codeigniter
- express url redirect
- firebase react js
- ionicActionSheet decorator example