set select option as selected jquery
$(document).ready(function() { $("#gate option[value='Gateway 2']").prop('selected', true); // you need to specify id of combo to set right combo, if more than one combo });
Source: stackoverflow.com
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";
select default value
<option selected> 5 </option>
select set selected value html
<select> <option value="2" selected disabled hidden>Choose here</option> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> <option value="4">Four</option> <option value="5">Five</option> </select> Run code snippetHide results
Source: stackoverflow.com