javascript dom innerhtml variabl code example
Example 1: js innerHTML
document.getElementById("Test").innerHTML = "<p style='color:red;'>Test</p>";
Example 2: innerhtml mozilla
var boxElem = document.querySelector(".box");
boxElem.addEventListener("mousedown", logEvent);
boxElem.addEventListener("mouseup", logEvent);
boxElem.addEventListener("click", logEvent);
boxElem.addEventListener("mouseenter", logEvent);
boxElem.addEventListener("mouseleave", logEvent);