js 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
}x.options.length
Also in JavaScript:
- react redirect on click
- double function call javascript
- javascript get all instances of a class
- javascript arrays codeburst
- remove space from string javascript
- json opposite of stringify
- difference between type and method in ajax
- javascript submit form when enter key pressed
- set multiple attributes css javascript
- expresiones regulares javascript
- javascript ascending and descending
- js array from
- what is a 0 based language
- javascript add div to body with class
- js check if undefined
- document.queryselector picks first or last
- javascript round to 2 decimal places
- get file extension of path extendscript
- how to restablished closed rxjs websocket
- javascript settimeout loop
- call node.js file electron
- hark javascript
- javascript form submit on button click check if required fields not empty
- checkbox on click jquery