change element in javascript code example
Example 1: add style javascript
// Bad:
element.setAttribute("style", "background-color: red;");
// Good:
element.style.backgroundColor = "red";
Example 2: how to change html element in javascript
document.getElementbyid.innerHTML = "text";