W3SchoolsGet the element with the specified id: Get the element and change its color: Or just change its color: The getElementById() method returns an element with a specified value. The aiapr导航更多内容请查看https://www.w3schools.com/jsref/met_document_getelementbyid.asp
Mozilla DeveloperDocument: getElementById() method The getElementById() method of the Document interface returns an Element object representing the element whose id property matches the specified string. Since element 更多内容请查看https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
w3ccoo.comhttps://www.w3ccoo.com/jsref/met_document_getelementbyidHTML DOM getElementById() 方法 | JavaScript 和 HTML getElementById () 方法可返回对拥有指定 ID 的第一个对象的引用。 HTML DOM 定义了多种查找元素的方法,除了 getElementById () 之外,还有 getElementsByName () 和 更多内容请查看https://www.w3ccoo.com/jsref/met_document_getelementbyid.html