Definition and Usage. The The following example creates a very simple dropdown menu, the second option of which is selected by default.The follow example is more complex, showing off more features you can use on a Get the latest and greatest from MDN delivered straight to your inbox.The newsletter is offered in English only at the moment.
The HTML tags define the menu. If you'd like to contribute to the interactive examples project, please clone If the control is presented as a scrolling list box (e.g. The index starts at 0.
If you haven’t already created an account, you will be prompted to do so after signing in. Surround the select box within a "custom-select" DIV element.
Note: If no option is selected, the selectedIndex property will return -1. The