Mozilla Developerhttps://developer.mozilla.org//Document/getElementByIdDocument:getElementById() 方法 Document:getElementById () 方法. Document 接口的 getElementById() 方法返回一个表示 id 属性与指定字符串相匹配的元素的 Element 对象。. 由于元素的 ID 在指定时必 更多内容请查看https://developer.mozilla.org/zh-CN/docs/Web/API/Document/getElementById
菜鸟教程https://www.runoob.com/jsref/met-document-getelementbyidHTML DOM getElementById() 方法 | 菜鸟教程getElementById() 方法可返回对拥有指定 ID 的第一个对象的引用。 HTML DOM 定义了多种查找元素的方法,除了 getElementById() 之外,还有 getElementsByName() 和 更多内容请查看https://www.runoob.com/jsref/met-document-getelementbyid.html