Check out example codes for "innerhtml mozilla". It will help you in understanding the concepts better.

Code Example 1

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);

Learn ReactJs, React Native from akashmittal.com