Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您可以使用document.geteElementsByTagName('select')将返回<select>DOM 中所有元素的集合的方法,然后您可以循环并执行您最初打算对元素执行的任何操作。
document.geteElementsByTagName('select')
<select>
参考资料:document.getElementsByTagName。
document.getElementsByTagName