Skip to content

Instantly share code, notes, and snippets.

@xto3na
Last active May 27, 2021 11:24
Show Gist options
  • Save xto3na/34fbb6669046ea7bc1472e5dfda20306 to your computer and use it in GitHub Desktop.
Save xto3na/34fbb6669046ea7bc1472e5dfda20306 to your computer and use it in GitHub Desktop.
document.getElementById("selectId").selectedIndex = 2;
// or
document.querySelector('#select').value = 'neededValue';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment