get element by id style code example
Example 1: javascript get element by id
var element = document.getElementById("YourElementId");
Example 2: javascript get element by id
var myElement=document.getElementById("someElementID");
Example 3: style through javascript
element.style.backgroundColor = "red"; // set the background color of an element to red