<!DOCTYPE html>
<html>
<body>

<form>
Select your favorite fruit:
<select>
  <option id="apple">Apple</option>
  <option id="orange">Orange</option>
  <option id="pineapple" selected>Pineapple</option> // Pre-selected
  <option id="banana">Banana</option>
</select>
</form>

<p>Click the button to change the selected option in the dropdown list to "orange" instead of "pinapple".</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementById("orange").selected = "true";
}
</script>

</body>
</html>