Answers for "javascript set html select value"

4

javascript set html select value

// Get the html select element
var select = document.getElementById('<your select element id>');

// If you have a <option> like this:
// <option value="1">My Value Display text</option>

//Then your selected value of your select would be:

select.value = "1";
Posted by: Guest on September-29-2020

Code answers related to "javascript set html select value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language