<html>
<head>
<script>
function displayResult()
{
document.getElementById("orange").selected=true;
}
</script>
</head>
<body>
<form>
Select your favorite fruit:
<select>
<option id="apple">Apple</option>
<option id="orange">Orange</option>
<option id="pineapple" selected>Pineapple</option>
<option id="banana">Banana</option>
</select>
</form>
<button type="button" onclick="displayResult()">Select Orange</button>
</body>
</html>