javascript get all select options
//looping through options select with jQuery
$("#mySelectID option").each(function(){
var thisOptionValue=$(this).val();
});var options = document.getElementById('mySelectID').options;
for (let i = 0; i < options.length; i++) {
console.log(options[i].value);//log the value
}
Also in JavaScript:
- jquery reload page
- ngswitchcase in angular 8
- how to validate input type=date in javascript
- js check if number has decimals
- cJSON_CreateObject
- javascript detect dark mode
- tip in js
- display none js
- const in javascript
- d3 v6
- chartjs template jquery html
- javascript get current month start and end date
- array destructuring in javascript
- jquery set att
- sars
- javascript loop last index
- js format urcurency
- get a user input react
- tableau javascript
- react native textinput not show cursor
- info
- find class
- http request without a library in javascript
- collision detection three js