<form> 你喜欢的水果是: <select id="mySelect"> <option>Apple</option> <option>Orange</option> <option>Pineapple</option> <option>Banana</option> </select> <br><br> <input type="button" onclick="getIndex()" value="弹出选中项"> </form>