Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The usual method to show previously selected options from a dropdown menu is by setting the selected attribute to true for the corresponding option in the HTML code. For example:

<select>
  <option value="option1" selected>Option 1</option>
  <option value="option2">Option 2</option>
  <option value="option3" selected>Option 3</option>
</select>

In this example, the first and third options are selected and will be displayed as such in the dropdown menu.