selectedoptions javascript code example
Example: javascript get all select options
var options = document.getElementById('mySelectID').options;
for (let i = 0; i < options.length; i++) {
console.log(options[i].value);//log the value
}
var options = document.getElementById('mySelectID').options;
for (let i = 0; i < options.length; i++) {
console.log(options[i].value);//log the value
}