Planets

Planets

<select id="planets" onChange="document.getElementById('planetChosen').value=this.options[this.selectedIndex].value;document.getElementById('submitButton').disabled='';">
    <option value="">Select a Planet</option>
    <option value="Mercury">Mercury</option>
    <option value="Venus">Venus</option>
    <option value="Earth">Earth</option>
    <option value="Mars">Mars</option>
    <option value="Jupiter">Jupiter</option>
    <option value="Saturn">Saturn</option>
    <option value="Uranus">Uranus</option>
    <option value="Pluto">Pluto</option>
</select><br>
<input type="text" id="planetChosen" placeholder="Choose a Planet" onFocus="this.blur();"><br>
<input value="Confirm Selection" type="button" onClick="alert('Thank you for selecting '+document.getElementById('planetChosen').value);" disabled="disabled" id="submitButton">
Comments are closed.