Answers for "how to get value of select list in javascript"

0

how to get selected list item value in javascript

var as = document.form1.ddlViewBy.value;
var e = document.getElementById("ddlViewBy");
var strUser = e.options[e.selectedIndex].value;
Posted by: Guest on October-08-2020
2

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

Code answers related to "how to get value of select list in javascript"

Browse Popular Code Answers by Language