Answers for "get option object from select"

4

use js to get select value

// reference to 'scripts' select list 
// used throughout the examples below
var sel = document.getElementById('scripts');

// display value property of select list (from selected option)
console.log( sel.value );
Posted by: Guest on February-22-2020
0

get selected option from select javascript

const selectedValue = document.getElementById("color-id").value;
Posted by: Guest on January-25-2022

Code answers related to "get option object from select"

Code answers related to "Javascript"

Browse Popular Code Answers by Language