W3SchoolsGet the element and change its color: Or just change its color: The getElementById() method returns an element with a specified value. The getElementById() method returns null if the 更多内容请查看https://www.w3schools.com/jsref/met_document_getelementbyid.asp