<!DOCTYPE html> <html> <body> <h1>Element 对象</h1> <h2>children 属性</h2> <select id="mySelect" size="4"> <option>Audi</option> <option>BMW</option> <option>Saab</option> <option>Volvo</option> </select> <p>select 元素的第三个子元素 (index 2) 的文本是:</p> <p id="demo"></p> <script> const collection = document.getElementById("mySelect").children; document.getElementById("demo").innerHTML = collection[2].text; </script> </body> </html>